-
Notifications
You must be signed in to change notification settings - Fork 18
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 Custom Meta-schemas #19
Comments
Hello @dszier. Thank you for contacting me. |
I think it would be great if custom meta-schemas were supported. If so, I could turn on strict validation of schemas against my own meta-schema. However, with #16 fixed and a new version released, my needs will be met. Thanks for the response and for maintaining this great library :) |
The new release 1.0.0 is now available, which supports custom metaschema feature. Please refer to the changelog. |
I ran into the same issue with custom keywords as #16, but attempted to fix it by creating my own meta-schema that defines the keywords we use. Following the example of the hyper meta-schema, and the spec, I created a new meta-schema that defined my custom keywords. It referenced it's own id as
$schema
and incorporated draft-07 of the core meta-schema. However, when I try to read the schema, evenwithSchemaValidation(false)
, I getUnsuppoted metaschema: "http://my.company.com/meta-schemas/draft-01/schema#"
.My thinking would be that I should be able to read the meta-schema itself without having to do anything special, and then when reading schemas that make use of the meta-schema, read them
withSchemaResolver(new MyMetaSchemaResolver())
. However, my schema resolver doesn't even have a chance to resolve the meta-schema because it seems that the exception bubbles up before callingresolve()
.Am I doing something wrong and custom meta-schemas are already supported? Will this be a feature that Justify supports?
I took a look under the hood at how Justify creates JsonSchema objects for the core meta-schemas, and while I think I can get past the exception and read the meta-schema as a JsonSchema, it doesn't look like the internal schema catalog was really meant to be extended by having custom meta-schemas injected into it.
The text was updated successfully, but these errors were encountered: