We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
In the specs, it says that Omitting this keyword has the same behavior as an empty array. .
Omitting this keyword has the same behavior as an empty array.
However, using jsonschema, there seems to be a rule validating the number of elements:
jsonschema
>>> import jsonschema >>> schema = {"required": []} >>> jsonschema.validate({}, schema) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/mathieu/Code/Mozilla/kinto/.venv/lib/python3.5/site-packages/jsonschema/validators.py", line 540, in validate cls.check_schema(schema) File "/home/mathieu/Code/Mozilla/kinto/.venv/lib/python3.5/site-packages/jsonschema/validators.py", line 83, in check_schema raise SchemaError.create_from(error) jsonschema.exceptions.SchemaError: [] is too short Failed validating 'minItems' in schema['properties']['required']: {'items': {'type': 'string'}, 'minItems': 1, 'type': 'array', 'uniqueItems': True} On instance['required']: [] >>>
Let me know if I can help and submit a fix :)
Thanks!
The text was updated successfully, but these errors were encountered:
That's the spec for draft 6, not draft 4, and that's a thing that changed in draft 6.
Support for draft 6 is happening in #337 on the draft-06 branch, so definitely welcome patches on that branch!
Sorry, something went wrong.
No branches or pull requests
In the specs, it says that
Omitting this keyword has the same behavior as an empty array.
.However, using
jsonschema
, there seems to be a rule validating the number of elements:Let me know if I can help and submit a fix :)
Thanks!
The text was updated successfully, but these errors were encountered: