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

Support full JSON Schema validation #18

Closed
cyrilletuzi opened this issue Dec 8, 2017 · 0 comments
Closed

Support full JSON Schema validation #18

cyrilletuzi opened this issue Dec 8, 2017 · 0 comments
Assignees

Comments

@cyrilletuzi
Copy link
Owner

cyrilletuzi commented Dec 8, 2017

Only a subset of JSON Schema is used to validate the data in this lib. Just follow the provided JSONSchema interface.

In version 5 of this lib, you can only use:

  • type
  • properties and required
  • items
  • required

Since version 6 of this lib, you can use:

New types:

  • enum
  • const

Validation of numbers:

  • multipleOf
  • maximum
  • exclusiveMaximum
  • minimum
  • exclusiveMinimum

Validation of strings:

  • maxLength
  • minLength
  • pattern

Validation of arrays:

  • maxItems
  • minItems
  • uniqueItems

The following ones won't be included because the role of the validation feature in this lib is to check the data against corruption, so validation should be more strict:

  • additionalItems
  • additionalProperties
  • propertyNames
  • maxProperties
  • minProperties
  • patternProperties
  • not
  • contains
  • allOf
  • anyOf
  • oneOf
  • array for type
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant