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
I'm getting unexpected behaviour with the validation of the schema when it comes to enums.
For example, consider the following schema:
{ "$schema": "http://json-schema.org/draft-07/schema", "definitions": { "rule": { "description": "A rule.", "type": "object", "properties": { "kind": { "description": "The kind of a rule.", "type": "string", "enum": [ "tested" ] } }, "required": [ "kind" ], "additionalProperties": false } }, "properties": { "rules": { "description": "Rule list", "type": "array", "items": { "$ref": "#/definitions/rule" }, "minProperties": 1, "additionalProperties": false } } }
And the following YML file:
rules: - kind: test
We should get an error in test as it is not an element of the enum.
test
No error. It seems that as long it is as prefix of an element in the enum, the validation succeeds.
The text was updated successfully, but these errors were encountered:
Issue has been resolved and it will be available on the next v1.10.0
Sorry, something went wrong.
Many thanks @msivasubramaniaan 🙌
msivasubramaniaan
No branches or pull requests
Describe the bug
I'm getting unexpected behaviour with the validation of the schema when it comes to enums.
For example, consider the following schema:
And the following YML file:
Expected Behavior
We should get an error in
test
as it is not an element of the enum.Current Behavior
No error. It seems that as long it is as prefix of an element in the enum, the validation succeeds.
Environment
The text was updated successfully, but these errors were encountered: