-
Notifications
You must be signed in to change notification settings - Fork 106
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
Support for more recent JSON Schema versions #160
Comments
Hi! I'm sorry for not maintaining and evolving the project much recently. I read the changelogs for 2019-09 and 2020-12 and I think there are some quick wins. The idea would be to support the old and new keywords interchangeably, even if that means accepting schemas that are not well structured or are using keywords that are not available in the version declared in the schema. I also don't know if the schemas that are found in the wild do declare their draft versions explicitly, because that would help tremendously. In that case, there could just be different code paths depending on the draft version. Here are my exploratory notes. Feel free to submit PRs or comment with your ideas! 2019-09(This is not a complete list)
|
Thumbs up on this work. I'm using the $refs, $defs, contains and items values from 2020-12 and it would be really good to have those supported. |
Our experience is that it's hit or miss. It seems that most attempt to, but a lot that do don't do it right (either over-specify, like having Some additional notes: First, I might not bother with 2019-09. We're trying to steer people away from it and just use 2020-12. Specifically the
|
Could you do the version detection in 2 ways. If the $id is value process appropriately, if not fail out with an "invalid version" type message. In those cases an individual can then use a command line flag --schema or so and put in draft7, 2020-12 etc and it does the same thing. if the wrong schema is put in on the command line results will vary ;). I feel if you are looking to generate using this tool you need to at least know what schema you are working against. |
Per the discussion in coveooss#160, allow the use of `$defs` for the definitions section.
I know this is an old issue, but also want to say thanks for looking at these newer drafts and considering their changes. Regarding
comment from @gregsdennis at #160 (comment) Just like to note: For a documentation generator like json-schema-for-humans, I guess it does carry some expected behavior - you would want the property to be marked as deprecated somehow in the generated docs when the property is present. E.g. similar to the current detection of |
Currently this project supports up to draft 7, which was released March 2018. Since then, two new versions have been release: 2019-09 (which probably should be skipped) and 2020-12 (which definitely should be supported).
What help would be needed to update this project to support the latest versions of JSON Schema?
The text was updated successfully, but these errors were encountered: