-
Notifications
You must be signed in to change notification settings - Fork 67
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
Exception when additionalProperties
is a boolean.
#69
Comments
Thanks for the report! |
When {
"type": "object",
"properties": {
"number": { "type": "number" },
"street_name": { "type": "string" },
"street_type": { "enum": ["Street", "Avenue", "Boulevard"] }
},
"additionalProperties": false
} This should be a valid output: { "number": 1600, "street_name": "Pennsylvania", "street_type": "Avenue" } When {
"type": "object",
"properties": {
"number": { "type": "number" },
"street_name": { "type": "string" },
"street_type": { "enum": ["Street", "Avenue", "Boulevard"] }
},
"additionalProperties": { "type": "string" }
} This should be a valid output: { "number": 1600, "street_name": "Pennsylvania", "street_type": "Avenue", "description": "NW"} where "description" is an additional entry where its corresponding data type could only be "string". @noamgat Thank you! |
@noamgat I am running into this too, I'd really like to be able to pass / enforce |
Should be fixed in Master. see #129 (comment) |
Boolean value will raise exception:
'int' object has no attribute 'get'
Expected behaviours: https://json-schema.org/understanding-json-schema/reference/object#additional-properties
The text was updated successfully, but these errors were encountered: