-
-
Notifications
You must be signed in to change notification settings - Fork 308
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
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.
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.
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.
That's why we stated the compatibility guarantee. Any https://json-schema.org/1/x
schema is compatible with all https://json-schema.org/1/x+i
specifications. As long as the version (1
in this case) is the same, that compatibility guarantee holds. Because of this, it's safe to have https://json-schema.org/1
as a $schema
value. Future releases within the same version will not break schemas.
@@ -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.
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 compatibility guarantee stated here necessitates that the version be first.
There is the issue linked at the top of this PR as well as this discussion thread (the rest of the discussion is worth reading as well). We also have our PROCESS.md file. |
Co-authored-by: Jason Desrosiers <[email protected]>
Co-authored-by: Jason Desrosiers <[email protected]>
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.