-
-
Notifications
You must be signed in to change notification settings - Fork 111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nested additionalProperties isn't respected #109
Comments
Okay, it turns out that I was a bit off, guess that's what I guess for jumping to conclusions to fast. The problem was that the object I validated actually looked like this: {
"id": "0ebcd4bb-a721-46b6-bcb8-85276fbc75f3",
"data": {
"test": "I should be allowed!"
}
} So the real problem seems to be that the field get's reported as |
Also, the following schema: {
type: 'object',
properties: {},
additionalProperties: false,
$schema: 'http://json-schema.org/draft-04/schema#'
} with the same data: {
"id": "0ebcd4bb-a721-46b6-bcb8-85276fbc75f3",
"data": {
"test": "I should be allowed!"
}
} Gives to errors with the same field: [ { field: 'data', message: 'has additional properties' },
{ field: 'data', message: 'has additional properties' } ] |
Okay, I'm just spewing out confusion today 😆 The problem has nothing to do with my field named I wouldn't actually have found myself in this situation if either one of #84 or #102 would have been implemented, so I'm going to close this one in favour of those. If anyone read this, thank you for your time, hopefully it provided some amusement :) |
@LinusU haha no worries |
Example schema:
Example data:
This is rejected by is-my-json-valid with the following error:
The text was updated successfully, but these errors were encountered: