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

Add missing $schema keyword to required test cases #689

Merged

Conversation

skryukov
Copy link
Contributor

@skryukov skryukov commented Oct 10, 2023

This PR adds missing $schema keywords to required test cases.

Validation with absent $schema keyword shouldn't be considered as required by implementations.

Spec reference:

The "$schema" keyword SHOULD be used in the document root schema object, and MAY be used in the root schema objects of embedded schema resources. It MUST NOT appear in non-resource root schema objects. If absent from the document root schema, the resulting behavior is implementation-defined.

https://json-schema.org/draft/2020-12/json-schema-core#section-8.1.1-4

@skryukov skryukov requested a review from a team as a code owner October 10, 2023 21:22
@skryukov skryukov changed the title Add $schema keyword to required tests Add missing $schema keyword to required test cases Oct 10, 2023
@gregsdennis
Copy link
Member

Weird. This was already done in #586.

@Julian do you know if/why this was reverted?

@Julian
Copy link
Member

Julian commented Oct 10, 2023

They just look like new tests where it was forgotten (because we don't have a sanity check ensuring we don't forget of course).

@gregsdennis
Copy link
Member

Looks like #594 was merged a week later and just wasn't correspondingly updated.

Copy link
Member

@gregsdennis gregsdennis left a comment

Choose a reason for hiding this comment

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

Thanks for these!

@Julian Julian merged commit ba52c48 into json-schema-org:main Oct 11, 2023
@skryukov skryukov deleted the add-schema-keyword-to-required-tests branch October 14, 2023 20:09
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.

3 participants