Skip to content

Changes

Started by upstream project gerrit-onomondo-eim #131
Started 10 hr ago
Queued 1 min 31 sec
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
pmaier@sysmocom.de at