-
-
Notifications
You must be signed in to change notification settings - Fork 273
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
JSON Hyper-Schema Needs Schema Version Parity #1120
Comments
I think this is a reasonable request. It's normal practice for IETF drafts* to be republished without changed after they have expired to indicate that they are still active. We don't have the bandwidth to maintain Hyper-Schema right now, but the effort to simply republish with with updated schemas would be trivial. I'd volunteer to do the work.
|
Another approach to consider is that we don't even necessarily need to publish a new draft. All we need is to provide a new dialect meta-schema that uses the most recent version of validation and hyper-schema. Both are designed as modular vocabularies for exactly this kind of thing. For 2020-12, we would need to provide a 2020-12 version of the 2019-09 hyper-schema vocabulary schema because of issues with |
@jdesrosiers I personally am fine without an updated IETF draft. Updated meta-schema would be enough to avoid breaking implementations and keep the door open to an upsurge of interest. With OpenAPI's recent adoption of 2020-12, there will be a lot of new attention on JSON Schema, and it seems like an inopportune time for Hyper-Schema to fall out of view. |
We talked about this and decided to go with what I proposed and publish a dialect that uses 2020-12 validation with 2019-09 hyper-schema. But, we have a choice to make. It turns out that the links.json schema uses
I prefer option 2 because it makes maintaining things in the future easier. The downside is the strangeness of using a meta-schema for 2019-09 that uses a dialect that didn't even exist when 2019-09 was released. Since what we have now in unusable anyway, it's unlikely we would be stepping on anyone's toes with this change. But, I'd be ok with any of the other options as well if anyone feels strongly about it. |
How difficult would it be to do a full new version of hyperschema that used $dynamicRef and the rest of the draft2020-12 dialect? |
Not difficult at all. All of these options are easy. It's just a matter of deciding how or if we want to fix the 2019-09 schemas since what was originally intended is not possible. |
This would be a good usecase for using the |
@jdesrosiers do you feel we need a separate Discussion relating to broken 2019-09 hyper schema meta-schemas? If so, please feel free to create one and link to it form here. |
@Relequestual If it looks like there's going to be multiple opposing strong opinions that need to be discussed, I'll create a discussion. But, I don't think that's likely. |
Thanks for doing this, Jason! I also wonder if it would make sense to manage hyper-schema independently from the rest of JSON Schema. Decoupling might avoid the problem of hyper-schema being a burden to JSON Schema and the risk to hyper-schema as a going concern. Hyper-schema could simply trail JSON Schema's release schedule and develop independently. Not sure I see all the implications, but thought I'd put that out there. Thanks again! |
You have a good point about AJV's limitations. That's something to keep in mind for the future, but in this case, we will need to provide a 2020-12 version of the 2019-09 Hyper-Schema vocabulary anyway because
Effectively, it is independent. It's its own specification and absolutely can move at it's own pace. The only way that the Hyper-Schema spec is a burden to Core and Validation specs is that it takes time away from Core and Validation work. We're just stretched too thin. |
I don't like the idea of just leaving 2019-09/hyper-schema broken and since AJV would likely choke if it was written in 2020-12, I think that leaves option 3 as the way to go.
|
Isn't that AJV's problem? (meant half-humorously). I think the fact that hyperschema's use of $recursiveRef is not according to the spec is a compelling reason to bring it up to draft2020-12 and use $dynamicRef. |
Yes, it certainly is. I'm not super concerned about AJV specifically especially because there are alternatives that can do the job. I was thinking along the lines of, if AJV has this limitation, then there are probably more out there that do as well and some of those implementations might not have good alternatives. It creates a higher barrier of entry even if it might have the positive effect of forcing implementations to improve. Then again, we don't want to encourage people to use 2019-09/schema at this point anyway, so maybe making it harder to use it with hyper-schema is a feature not a bug. Also, no matter what we choose, it's not going to work with AJV until they fix their |
I'll leave the two PRs for adding and fixing hyper-schema meta-schemas up for one more week to give people a chance to comment, approve, object, or whatever. Then barring any objections, I'll merge them then. |
The schema fixes and additionals have been merged and I've opened PR json-schema-org/json-schema-org.github.io#419 to make them available on the website. |
@jdesrosiers Jason, thanks again for your work on this! |
Schemas are now available on the website. |
Also, share/draft2019-09/links.json has |
No, https://json-schema.org/draft/2020-12/hyper-schema should exist. It does.
🤦♂️ Yeah, it should be ".../schema". |
https://json-schema.org/draft/2019-09/output/hyper-schema exists.
|
That's a 404 response, right?. That's the response I would expect for any URL to something that doesn't exist. Am I missing what you're trying to tell me? |
https://json-schema.org/draft/2019-09/output/hyper-schema exists. |
Oh, I didn't realize "output/hyper-schema" was a real thing. I guess I should add that too. |
In release 2020-12, JSON Schema released new draft schemas without updating Hyper-Schema. As a result, Hyper-Schema's most recent drafts are associated with 2019-09. Given the differences between 2019-09 and 2020-12, as well as differences in implementations, the lack of schema parity for Hyper-Schema discourages its adoption. I propose that even without feature changes to Hyper-Schema, its meta-schemas and related materials should continue to be updated and released as part of the JSON Schema cohort of specifications.
Hyper-Schema is a clean, graceful, portable way to provide hypermedia support for JSON objects. Unlike other hypermedia styles, it avoids changes to the objects themselves. Though it has not been widely adopted thus far, growing interest in JSON Schema is likely to increase attention to its ability to support hypermedia.
Please consider bringing Hyper-Schema back into parity with JSON Schema.
If you agree, please 👍 this request.
Thanks for all the great work on JSON Schema. You are making a difference!
The text was updated successfully, but these errors were encountered: