Skip to content

Validating schema against empty json #937

Answered by Julian
aij0 asked this question in Q&A
Discussion options

You must be logged in to vote

In the JSON Schema specification (all current versions of it), properties are not required by default until you say so, either via the required validator or by saying additionalProperties: false.

Without doing so, what your schema means is simply that those subschemas apply only if the corresponding property is present.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@aij0
Comment options

Answer selected by aij0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants