-
Notifications
You must be signed in to change notification settings - Fork 356
Can't find the correct way to use SchemaStorage #435
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
Comments
Nevermind, I found it, and I was entirely too quick to open up an issue. Some further explanation of SchemaStorage for others running into the same sort of trouble:
|
If you are confused by something, you are most welcome to open issues to ask - I'm aware the documentation is terrible at the moment. Better documentation is on my list of things to do for this project, and is fairly important, because what we have at the moment is rather useless. Regarding your original question - what you are trying to do IS NOT SUPPORTED by the JSON Schema standard - there is no official mechanism through which inheritance is possible. If you use
There are some unofficial extensions that allow for this (e.g. |
That is strange, because using the idiom I sketched above indeed it seems to work. |
That's a big problem - if it's not ignoring the rest of the properties, then it's a major bug that needs fixing. Thanks for bringing it to my attention! |
I was not even aware of writing invalid JSON schema... Well I guess once you fix it, a possible workaround for my requirements might be
|
Yep, using
|
This is fixed in #437, along with an infinite-loop case. Thanks again for finding the bug :-). |
Due to a lack of understanding on my part and also the rather slim documentation, I am forced to ask about the proper way to use SchemaStorage here.
I want to have a parent schema in place, located at
https://myurl.com/schema/parentschema.schema.json
and then multiple schemata, each inheriting the constraints fromparentschema
at the top level. I.e., the parentschema looks something likeand the subschemas all look something like
adding only their own respective required structure to the schema.
I am trying to use SchemaStorage like
The text was updated successfully, but these errors were encountered: