Skip to content

Fix missing "if present" for "else" #554

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

Merged
merged 2 commits into from
Mar 14, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions jsonschema-validation.xml
Original file line number Diff line number Diff line change
Expand Up @@ -759,12 +759,13 @@
<t>
Instances that fail to validate against this
keyword's subschema MUST also be valid against
the subschema value of the "else" keyword.
the subschema value of the "else" keyword, if
present.
</t>
<t>
Validation of the instance against this keyword
on its own always succeeds, regardless of the
validation outcome of against its subschema.
validation outcome of the instance against its subschema.
</t>
</section>
<section title="then">
Expand All @@ -780,8 +781,9 @@
<t>
When "if" is absent, or the instance fails to
validate against its subschema, validation against
this keyword always succeeds. Implementations
SHOULD avoid attempting to validate against
this keyword always succeeds, regardless of the
Copy link
Member

Choose a reason for hiding this comment

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

See comment below

validation outcome of the instance against its subschema.
Implementations SHOULD avoid attempting to validate against
the subschema in these cases.
</t>
</section>
Expand All @@ -799,8 +801,9 @@
<t>
When "if" is absent, or the instance successfully
validates against its subschema, validation against
this keyword always succeeds. Implementations
SHOULD avoid attempting to validate against
this keyword always succeeds, regardless of the
Copy link
Member

Choose a reason for hiding this comment

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

I know this isn't your change, but I find the phrasing...
"When "if" is absent, or the instance successfully validates against its subschema, validation against this keyword always succeeds..."

This reads to me as, when the subschema of if successfully validates, else always succeeds [validation], regardless of the actual validation result of the instance against it's subschema.

That can't be the intent...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Great feedback, I'll play around with this some more.
The main point of bug-fixing the validation spec is to clarify if/then/else so please highlight everything that's awkward.

validation outcome of the instance against its subschema.
Implementations SHOULD avoid attempting to validate against
the subschema in these cases.
</t>
</section>
Expand Down