Attention is currently required from: dexter, laforge.

dexter uploaded patch set #6 to this change.

View Change

The following approvals got outdated and were removed: Verified+1 by Jenkins Builder

rest_handler: add API versions and schema validation

The JSON based REST API currently has no version checking and also
does not use any JSON schema based validation yet. This patch adds
both. An X-ADMIN-PROTOCOL field in the HTTP header informs about
the API version (same style as the JSON interfaces defined in
GSMA SGP.32 and SGP.22 would use). For incoming messages, the
X-ADMIN-PROTOCOL field is checked to prevent outdated clients from
using the REST API.

The incoming and outgoing JSON messages are now validated against
JSON schema files. Those are the same JSON schema file which were
only provided for documentation purposes only before. Now those
files have been fixed up and moved to the priv directory, where
they are now actively used.

Change-Id: I76e91e53a009cedf2cb1a0297db86e9e5fe7047a
Related: SYS#8100
---
M contrib/restop.py
M doc/rest_api.md
R priv/rest_api_info_schema.json
R priv/rest_api_resource_schema.json
R priv/rest_api_response_schema.json
M rebar.config
M rebar.lock
M src/onomondo_eim.app.src
M src/onomondo_eim_app.erl
M src/rest_handler.erl
A src/rest_middleware.erl
11 files changed, 191 insertions(+), 63 deletions(-)

git pull ssh://gerrit.osmocom.org:29418/onomondo-eim refs/changes/89/43089/6

To view, visit change 43089. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: newpatchset
Gerrit-Project: onomondo-eim
Gerrit-Branch: master
Gerrit-Change-Id: I76e91e53a009cedf2cb1a0297db86e9e5fe7047a
Gerrit-Change-Number: 43089
Gerrit-PatchSet: 6
Gerrit-Owner: dexter <pmaier@sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge@osmocom.org>
Gerrit-Attention: laforge <laforge@osmocom.org>
Gerrit-Attention: dexter <pmaier@sysmocom.de>