Skip to content
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

Adding includeAdditionalProperties = false(or true) in Validation option #32

Open
vivek656 opened this issue Jul 3, 2023 · 1 comment

Comments

@vivek656
Copy link

vivek656 commented Jul 3, 2023

In Validation options , we can pass, format checking , unique key validation method etc. to customize our SchmeaValidator.

  • It will be helpful if we can pass includeAdditionalProperty = false (true by default) , which will validate no addidtional property will be included in the object type.

This basically means, instiating the additionalPropertyValidator everytime , for every object type, if value is false.
Many opensource schema , is used in various companies, many dont put additionalProperties = false on every object type field.
Dev wants to work with these schema, but need a way to prevent adding additional non defined properties.
these schemas can also be very large.
This validationOption , help many to validate the constraint without altering the external schema.

@vivek656 vivek656 changed the title Adding includeAdditionalProperties = false(or true) in Valodation option Adding includeAdditionalProperties = false(or true) in Validation option Jul 3, 2023
@vivek656
Copy link
Author

@worldturner can anyone reply to this . Adding additional validation at runtime, would be a gamechanger to this library

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant