-
Notifications
You must be signed in to change notification settings - Fork 331
Unknown fields are not validated. #859
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
Comments
Well I guess it does, but not for sub-schemas, as it is restricted to the scope of the individual sub schemas. There was a feature in NetworkNt that subschemas are also validated when using unevalutatedProperties, but this is now restricted as of #826 So unevaluatedProperties also does not affect sub-schemas anymore, as the specification says so (although I cannot find the reference to this rule in the specs right now ;) ) So for validating nested properties now you have to add the additionalProperties=false or unevaluatedProperties=false to each of the sub-schemas, which is redundant, but sadly how it works. I hope I did address your issue. If you could give an example and explain what you expect, I could confirm this. |
@vicky16898 @manuelwaltschek I wonder if you want to test the latest version. |
@stevehu has anything changed regarding this? I haven't been up to date as I'm not working with the schema validation anymore. |
@justin-tay has refactored the library to resolve tons of issues and I think your issue is resolved already in the 1.3.3 version. Please verify when you have a chance. Thanks. |
The JSON Schema Validator appears to not raise errors when the payload includes fields that are not explicitly defined in the Swagger schema. This behavior prompts the question of whether the validator takes into account the "additionalProperties" flag specified in the Swagger definition to govern this aspect of validation.
The text was updated successfully, but these errors were encountered: