Skip to content
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

new JSON Schema Draft version support #747

Open
CagtayFabry opened this issue Feb 6, 2020 · 1 comment
Open

new JSON Schema Draft version support #747

CagtayFabry opened this issue Feb 6, 2020 · 1 comment

Comments

@CagtayFabry
Copy link
Contributor

CagtayFabry commented Feb 6, 2020

I was wondering what the plans are for supporting new jsonschema specifications in the future.

Currently the asdf-standard is described as implementing the "JSON Schema Draft 4" specification. The asdf python package now works with jsonschema>=3.x which afaik supports JSON Schema up to Draft 7.
What would be needed regarding the asdf package but also the asdf-standard to support JSON Schema Draft 7 as well? (unfortunately my knowledge of asdf internals is lacking)
Would this require major changes/reworks?

I am interested in Draft 7 mostly because of conditional schema evaluation (if/then/else) which I think would also be a great addition to asdf.

related: asdf-format/asdf-standard#243

@CagtayFabry CagtayFabry changed the title new jsonschema draft version support new JSON Schema Draft version support Feb 6, 2020
@eslavich
Copy link
Contributor

eslavich commented Feb 7, 2020

I'm not aware of any specific plans, but this issue has revived discussion. There have been breaking changes in the JSON Schema spec between Draft 4 and Draft 7 so we would need to support both for a time. Off the top of my head, these are the steps required:

  • Create a new version of yaml-schema that incorporates JSON Schema Draft 7
  • Create new versions of all other asdf-standard schemas that declare the new yaml-schema version as their metaschema and follow the new spec
  • Make an asdf-standard release
  • Add code to this library to examine the $schema field of each schema and use Draft 4 or Draft 7 validators accordingly
  • It's going to lead to confusing errors if someone references a Draft 4 schema from Draft 7 (and vice versa), so we should probably add some special handling around that as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants