-
-
Notifications
You must be signed in to change notification settings - Fork 306
Gregsdennis/spec versioning #1596
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
base: main
Are you sure you want to change the base?
Conversation
161ebf1
to
39d784b
Compare
|
||
This specification is versioned by two values: iteration and release year. | ||
|
||
A schema written to conform with the requirements of a given version (iteration and release year) is compatible with specifications published with the same iteration value and either the same or greater release year value. Thus, JSON Schema provides a guarantee of compatibility for future releases within an iteration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the linter not working? It should have flagged this line as too long.
@@ -88,16 +88,27 @@ specification. | |||
## Meta-Schema {#meta-schema} | |||
|
|||
The current IRI for the default JSON Schema dialect meta-schema is | |||
`https://json-schema.org/draft/next/schema`. For schema author convenience, this | |||
meta-schema describes a dialect consisting of all keywords defined in this | |||
`https://json-schema.org/1/2025`. This IRI encodes the specifications version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
`https://json-schema.org/1/2025`. This IRI encodes the specifications version | |
`https://json-schema.org/1/2025`. This IRI encodes the specification's version |
`https://json-schema.org/1/2025`. This IRI encodes the specifications version | ||
and release year. Because all schemas written to conform to a given version are |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like there's some ambiguity here. You've defined the "version" as the iteration + release year. But, here you're calling the iteration "specification version".
`https://json-schema.org/1/2025`. This IRI encodes the specifications version | |
and release year. Because all schemas written to conform to a given version are | |
`https://json-schema.org/1/2025`. This IRI encodes the specifications iteration | |
and release year. Because all schemas written to conform to a given version are |
@@ -415,6 +415,12 @@ keywords MUST NOT begin with this prefix. | |||
Implementations MUST refuse to evaluate schemas which contain keywords which | |||
they do not know how to process or explicitly choose not to process. | |||
|
|||
## Specification Versioning and Compatibility | |||
|
|||
This specification is versioned by two values: iteration and release year. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The term "iteration" doesn't feel right to me. It's not very intuitive and it's never defined what it means.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sold on this idea at all. What other ideas were considered? Is there a discussion that I missed?
`https://json-schema.org/1/2025`. This IRI encodes the specifications version | ||
and release year. Because all schemas written to conform to a given version are | ||
guaranteed to be compatible with later releases within the same iteration, the | ||
meta-schema IRI `https://json-schema.org/1` is also recognized to represent the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- what is "indicated iteration"?
- using a URI that can change meaning depending on the current state of the spec feels really dodgy to me -- just like "https://json-schema.org/latest" would be, because the mapping of this value can change at any time, unexpectedly, which can be disruptive to both schema authors and implementation authors.
@@ -2188,7 +2195,7 @@ and only allows the "data" and "children" properties. An example instance with | |||
|
|||
```jsonschema "Tree schema, extensible" | |||
{ | |||
"$schema": "https://json-schema.org/draft/next/schema", | |||
"$schema": "https://json-schema.org/1/2025", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Putting the iteration before the year is not going to sort very well, and I imagine it could easily be confused with a date.
What kind of change does this PR introduce?
clarification
Issue & Discussion References
Summary
Update meta-schema IRIs and provide some explanation of the path meaning. Probably could use a bit more explanation, but would like to get others' opinions.
Does this PR introduce a breaking change?
No? Maybe? I'm not sure how this applies since it's a necessary change.