OBP-API icon indicating copy to clipboard operation
OBP-API copied to clipboard

Provide JSON schemas for OBP ResourceDoc endpoint

Open hongwei1 opened this issue 7 years ago • 1 comments

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" } } } } }

hongwei1 avatar Jan 08 '18 08:01 hongwei1

Make sure the typed.... fields validate with http://json-schema-validator.herokuapp.com/

simonredfern avatar Jan 14 '18 10:01 simonredfern