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

Set typeLoose to false in JSON Validator #122

Closed
chuwy opened this issue Oct 4, 2019 · 0 comments
Closed

Set typeLoose to false in JSON Validator #122

chuwy opened this issue Oct 4, 2019 · 0 comments
Assignees
Labels
Milestone

Comments

@chuwy
Copy link
Contributor

chuwy commented Oct 4, 2019

Networknt JSON Schema validator has a configuration property called typeLoose which is set to true by default. This property makes validator compatible with OpenAPI specification and incompatible with official JSON Schema v4 specification.

This has two consequences:

  1. Expected one. We want validation to be compatible with v4 and usually as strict as possible, typeLoose makes it not strict enough
  2. Unexpected one. A bug mentioned in Bump json-schema-validator to 1.0.28 #121 exists only in typeLoose validator (null is not valid against nullable array with typeLoose false networknt/json-schema-validator#194), which means by disabling it we should get rid of the bug
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant