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
Set default meta-schema in options #90
Comments
One approach is to create your own meta-schema (that would have I am not sure why do you need it though. Are your schemas supplied at run time? You can simply run additional validation on them with some simple schema if that's the case. |
Yep, all of the schemas (except of core) stores externally, and it can change at runtime -- that's why I need extra logic to validate them.
Schemas without |
Yes, they will fallback. Rightly so :) In any case, I think the better approach is to impose any additional requirements via some additional schema (or even without schema) than to modify meta-schema. For example, you can validate all your external schemas with If you really must change the default meta-schema nobody can stop you from using the option |
The problem is that I have A LOT of extra-logic for my external schemas (like root-only keywords, required properties, blacklisted properties for internal schemas) :C
That's what I do right now, but it's hacky and weird, and it means I use internal API, which one can be broken without updation major version. Is any plans to add an explicit way to set the default meta-schema? |
I will make this api public, it's just changing readme... It can be useful in some cases. I don't like the idea of making such an option though. I will think about it. |
I can now see several other use cases for it. So I think it can be done. I think that this default meta-schema should be passed in The following has to be done:
@trikadin if you still need this feature and have time to do it I would really appreciate it. |
As for now, default validation meta-schema is v4 or (if corresponding option is true) v5-proposal. How to change this behaviour and set my custom meta-schema as default? V4 defines shemas like
{}
as valid, what is unacceptable (in my case) for top-level schemas.The text was updated successfully, but these errors were encountered: