OBP-API
OBP-API copied to clipboard
Provide JSON schemas for OBP ResourceDoc endpoint
Provide JSON schemas for your methods
In schema you need to declare:
- String types acceptable per method : string, ing, etc.
- Arrays (if applicable)
- Booleans
- Nulls
- Objects
Example of load: { "first_name": "George", "last_name": "Washington", "birthday": "1732-02-22", "address": { "street_address": "3200 Mount Vernon Memorial Highway", "city": "Mount Vernon", "state": "Virginia", "country": "United States" } }
Corresponding schema: { "type": "object", "properties": { "first_name": { "type": "string" }, "last_name": { "type": "string" }, "birthday": { "type": "string", "format": "date-time" }, "address": { "type": "object", "properties": { "street_address": { "type": "string" }, "city": { "type": "string" }, "state": { "type": "string" }, "country": { "type": "string" } } } } }
Make sure the typed.... fields validate with http://json-schema-validator.herokuapp.com/