JSON Schema Extensions #257
Replies: 2 comments 2 replies
-
Since I've been working on defining our new process and want to have a stable release out relatively soon, so I'm reading this from the perspective of how it might effect getting a release out. I don't think there's anything here that is incompatible with the direction we've been planning for. The first section is pretty much exactly what we've been talking about doing. I think the only significant difference is that you would like compatibility to apply retroactively to previous releases and we've been talking about it only applying to the next release and forward. The second section amounts mostly to defining a set of required keywords and proposing some new keywords. The new keywords can be proposed through the new stabilization process. We would want to make a decision before the next release on what keywords are required. It's easy to add required keywords later, but we can't make a keyword not required later. I think there should be an separate issue dedicated to that discussion. Adding new keywords can wait for now. We have been talking about how we should have an easy way for users to declare a keyword that is a simple value annotation without having to create a vocabulary. The The third and fourth sections are mostly a re-org of the spec, which should be fine to do at any time. I think that particular discussion doesn't need to hold up the next release. If I missed anything that doesn't seem like it's compatible with the approach we've been discussing in https://github.com/orgs/json-schema-org/discussions/234, please let me know. I think it's great that you laid out your full vision so clearly. It will be good context to link to in individual issues as we collectively decide which parts of your vision to adopt issue by issue. |
Beta Was this translation helpful? Give feedback.
-
@awwright I agree with most of the broad strokes of your Part 1. [EDIT: I'll come back later with thoughts on the other parts] $vocabularyI particularly agree with this:
On the one hand, the multi-document problem can easily be ensured by including the process of examining On the other hand, that does not make the meta-schema all that usable. However, since This could be further condensed by a specific keyword to use in place of Looking at the other points you make about
Yes, and we've discussed relaxing it. The main reasons we have not include:
The big problem here is how to get to an understanding of the keywords that are present with the minimal extra effort. Currently, the system is not usable in some environments because of the multi-file requirement.
This will get a lot simpler if we adopt the JRI proposal, as a significant chunk of core becomes a reference to a stable external spec. And that reference would be in the JSON Schema media type spec, rather than the main document. Of the remaining keywords, $schemaI'm less clear on this section.
Is this about how to handle
Do you mean that
Are you talking about each implementation defining their acceptable set with a meta-schema? Why would we want to do that?
I don't follow this point at all, I'm afraid. |
Beta Was this translation helpful? Give feedback.
-
For a while I've been promising a detailed specification that lays out how JSON Schema can ensure stability (forward compatibility when we make changes), and even some amount of backwards compatibility (how should implementations handle obsolete behavior that's since been removed from old specifications).
This is a writeup that I started last week when I got bored and only had my iPad: JSON Schema Extensions 20221024.pdf
I don't know why I called it JSON Schema Extensions because in some senses it's the opposite of that: what are the minimum of things that validators must do in order work well with changes and extensions defined at a later date?
I'm still evaluating the best way to execute changes like this. It doesn't make very many major changes, it introduces the concept of an "indeterminate" result. And it makes several suggestions that I think logically flow from this.
The major consideration is that it suggests the features that we thought were "core" features should actually be grouped differently. For example, several
$
keywords, and annotations, are not required concepts for validators in order to ensure interoperability.Please let me know thoughts about this document, especially if you have any missing use cases, questions or comments about one part or another, or how this might be actually implemented.
Beta Was this translation helpful? Give feedback.
All reactions