Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
`additionalProperties: false` in JSON Schema #851
The JSON Schema we host now at jsonapi.org currently says that additional properties are not allowed in any spec-defined objects, which is correct:
However, the spec also says that, if clients and servers do encounter any additional properties, they must ignore them, which allows us to extend the base objects in the future.
I'm worried that some server devs will use the current schema to validate incoming request documents, and then (inadvertently) their servers will inadvertently reject documents by future clients (i.e. with extra properties) that they should accept.
So, I see a few options:
All good points. Maybe the can be addressed by naming, having 'the schema' aka spec validation version and a 'production' version (I hesitate to say strict and transitional).
I don't know json_schema well enough if such a thing is supported within it and lazy me not looking right now :)
Some erb-type doc generator could allow two versions from one source for sure.