Skip to content

$id property is making validation fail #350

Closed Answered by pboettch
niko874 asked this question in Q&A
Discussion options

You must be logged in to vote

In your schema in every object you have

      "additionalProperties": false,

So any field mentioned in the json-file which not described by the schema will make validation fail. Hence the "validation failed for additional property '$id': instance invalid as per false-schema".

$id and other reserved words are reserved for schemas only, but not for documents. You can of course use any name you want, but the schema has to accept them.

Replies: 2 comments 2 replies

Comment options

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

Comment options

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

Answer selected by niko874
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