September 2018
Intermediate to advanced
764 pages
20h 6m
English
At the moment, the only constraint we placed on the name property is that it must be an object. This is not specific enough. Because the value of each property is just another valid JSON Schema, we can define a more specific schema for the name property:
{ "type": "object", "properties": { "bio": { "type": "string" }, "summary": { "type": "string" }, "name": { "type": "object", "properties": { "first": { "type": "string" }, "last": { "type": "string" }, "middle": { "type": "string" } }, "additionalProperties": false } }, "additionalProperties": false}
This JSON Schema satisfies every constraint we want to impose on our Create User request payload. However, it looks just like an arbitrary JSON object; someone ...
Read now
Unlock full access