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

If then else sequencing #437

Merged

Conversation

gregsdennis
Copy link
Member

@gregsdennis gregsdennis commented Sep 27, 2020

These tests are for validators that use parsers that maintain serialization order of JSON. Only these validators can be expected to fail these tests.

Any validator that does not maintain order should pass anyway.

Comment on lines +247 to +249
"description": "no redirects to then and fails",
"data": "no",
"valid": false
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For this case, a validator processing the keywords in serialization sequence would process as follows.

then - no annotations from if -> skip
else - no annotations from if -> skip
if - produces no failure condition, just annotation for then and else to read -> valid

But this case is invalid, so the test should fail for such a validator.

Comment on lines +252 to +254
"description": "invalid redirects to else and fails",
"data": "invalid",
"valid": false
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similarly here.

@Julian
Copy link
Member

Julian commented Sep 27, 2020

LGTM!

@gregsdennis gregsdennis merged commit c12b0db into json-schema-org:master Sep 27, 2020
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

Successfully merging this pull request may close these issues.

None yet

2 participants