Guidance around previous draft support #192
Replies: 4 comments 12 replies
-
I strongly agree. In my view there have been a few "eras" of JSON Schema, within which multiple draft support is relatively easy, but across which it is more challenging. I am hoping that the next "era" will be a long-term reliable steady state. Here's how I see it (with the bolded draft in the range being the one I'll use as shorthand for the era). Dates include time when the drafts in question were expired but not yet replaced.
I really think we should strongly recommend against new implementations supporting draft-04, and we should encourage cleaning up architecture by dropping support. I doubt it makes sense to draft-06 and draft-07 at this stage, given that that's where most of the "new" schema usage is so far. But I would definitely not discourage ignoring them in new implementations. I actually think we should discourage implementing 2019-09 in favor of 2020-12. 2019-09 had issues particularly with If I were implementing a validator today, I would support draft-07 and 2020-12, and that's all. I might support draft-06 because it's fairly trivial if you already have draft-07, but I'm not sure. I would definitely not support 2019-09 because the relatively few people who used it should move up to 2020-12 easily enough. But that's my personal take, not necessarily a recommendation for the project. |
Beta Was this translation helpful? Give feedback.
-
We should. Seeing how different implementations have diverged on how to support historical behavior (i.e. backwards compatibility), we should probably add some official guidance.
All drafts except the most recent one are end-of-life: if we wanted to require that implementations maintain support for a feature, we would have carried that feature over to the next draft. That said, maybe we shouldn't have been so hasty to delete paragraphs from the spec. There should be a deprecation period.
handrews's overview is good.
I think if we wrote some official guidance that everyone implemented in the same way, that could potentially simplify how it is implemented. |
Beta Was this translation helpful? Give feedback.
-
@Julian this could also likely impact the test suite. If we as an org decide to deprecate older versions of the spec, it would probably make sense to tag a "completion" state for the tests of those drafts and then remove them from the git |
Beta Was this translation helpful? Give feedback.
-
OK. There's some discussion on "LTS" and "deprecating" previous versions. (This discussion is on the 2022-08-01 OCWM FYI.) |
Beta Was this translation helpful? Give feedback.
-
Do we want to have any guidance for implementations on how to handle support for previous drafts? I think most of these fall under the purvue of implementor preference, so I wouldn't expect any of this to be found in the specification.
I don't know about other libraries, but mine is getting a bit chunky trying to support older versions, and I only support since draft 6. There are some architectural things that I could do to help maintenance, but ideally I think I want to just stop support for older drafts at some point.
Beta Was this translation helpful? Give feedback.
All reactions