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

Support for "http://json-schema.org/schema"? #396

Open
josvazg opened this issue Aug 30, 2017 · 3 comments
Open

Support for "http://json-schema.org/schema"? #396

josvazg opened this issue Aug 30, 2017 · 3 comments

Comments

@josvazg
Copy link

josvazg commented Aug 30, 2017

Using json-schema to validate Azure UI Templates (sample for version 0.1.2-preview) they use URL http://json-schema.org/schema as metaschema, but json-schema fails to use it as it is not preloaded.

As a workaround I do this, as it seems that URL is just draft 6 right now:

      AZURE_BASE_METASCHEMA="http://json-schema.org/schema#"
      ...
      default_draft6 = JSON::Validator.validator_for_name("draft6").clone
      default_draft6.uri = URI(AZURE_BASE_METASCHEMA)
      default_draft6.names = [AZURE_BASE_METASCHEMA]
      JSON::Validator.register_validator(default_draft6)

Which works fine so far.

Is it possible to have json-schema support that URL directly out of the box without my above trick?

@iainbeeston
Copy link
Contributor

Can you please try #388 and tell me if that works for you?

@iainbeeston
Copy link
Contributor

But please bear in mind that draft06 support is very basic at present

@josvazg
Copy link
Author

josvazg commented Aug 30, 2017

Well, will try but #388 seems to be about:
http://json-schema.org/draft/schema#
While this is about:
http://json-schema.org/schema#

Which also makes me think to be that "draft 6 "is not only no longer a draft, but the default json-schema to use. But haven't double checked it.

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