MXS-1220: Add more validation checks to request JSON

The requests that send a body should define at least a `data` member.

Added a simple test that checks that bad requests are rejected. This test
should be expanded to check that the returned error body contains the
correct members.
This commit is contained in:
Markus Mäkelä
2017-05-18 15:18:59 +03:00
parent 75e7ac35ed
commit e3c4bd7f72
3 changed files with 38 additions and 5 deletions

View File

@ -37,6 +37,7 @@ MXS_BEGIN_DECLS
#define MAX_ADMIN_HOST_LEN 1024
/** JSON Pointers to key parts of JSON objects */
#define MXS_JSON_PTR_DATA "/data"
#define MXS_JSON_PTR_ID "/data/id"
#define MXS_JSON_PTR_PARAMETERS "/data/attributes/parameters"