Skip to content

Conversation

@Shristibot
Copy link
Contributor

Added specification field to the type tests in type.json so each test now points to the official JSON Schema type keyword docs: https://json-schema.org/draft/2020-12/json-schema-validation#type

This helps anyone reading the tests understand which part of the spec each test is based on. No changes to test logic, just added reference links.

@Shristibot Shristibot requested a review from a team as a code owner December 26, 2025 04:57
{
"vocabulary": "validation",
"url": "https://json-schema.org/draft/2020-12/json-schema-validation#type",
"quote": "The value of this keyword MUST be either a string or an array. If it is an array, elements of the array MUST be strings and MUST be unique."
Copy link
Member

Choose a reason for hiding this comment

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

This isn't a good quote, it doesn't relate to the test being written in any of these cases. I'd either quote the relevant paragraph which is below it, or since it's such basic functionality, less fragile is just to use a reference to the section heading without a quote.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

"quote": "See JSON Schema Validation §6.1.1 Type"
should i add quote this way ?
@Julian

Copy link
Member

Choose a reason for hiding this comment

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

No, have a look at the (underdocumented) https://github.com/json-schema-org/JSON-Schema-Test-Suite/blob/main/test-schema.json#L48 and feel free to suggest a doc improvement for someone working on this, but you should essentially use validation: <section number> for the entirety of this object if my recollection is right. You can look around for other examples in the suite as well most likely, it'll look something like that.

Copy link
Contributor Author

@Shristibot Shristibot Dec 28, 2025

Choose a reason for hiding this comment

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

@Julian
I have added the validation: section number and removed the quote.

@gregsdennis
Copy link
Member

@Shristibot is this related to an issue? We need to open issues and discuss them before opening PRs. I'm not convinced this is necessary.

@Shristibot Shristibot marked this pull request as draft December 28, 2025 18:58
@Shristibot
Copy link
Contributor Author

@Shristibot is this related to an issue? We need to open issues and discuss them before opening PRs. I'm not convinced this is necessary.

@gregsdennis
This is an issue #807

@gregsdennis
Copy link
Member

No, @Shristibot , this (#807, what you linked to) is a PR. We need an issue where this proposed change can be discussed before a change is decided on and made.

@Shristibot
Copy link
Contributor Author

No, @Shristibot , this (#807, what you linked to) is a PR. We need an issue where this proposed change can be discussed before a change is decided on and made.

You’re right — I mistakenly linked a PR. The relevant issue is: #699

@Shristibot Shristibot force-pushed the for-specification-links branch from 80b369b to 890ea1f Compare December 30, 2025 11:05
@Shristibot Shristibot force-pushed the for-specification-links branch from 890ea1f to 6d699e7 Compare December 30, 2025 11:16
@Shristibot Shristibot marked this pull request as ready for review December 30, 2025 11:22
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.

4 participants