-
-
Notifications
You must be signed in to change notification settings - Fork 64
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
Recognizing the hyper-schema meta-schema? #33
Comments
I'd rather have #29 to be honest - it would cover it. |
You mean it would only work by fetching over the network? That's actually against the advice of the spec:
plus various notes about things being identifiers and how implementations SHOULD NOT automatically download (presumably if you are passing a custom meta-schema via a URI you know that it's fine to download, but do we really want constant traffic hitting json-schema.org?) |
(actually I'm not sure why I thought that quote indicated local support, but there are things about not overburdening schema servers) |
I'll probably end up using a modified local schema for testing anyway, but wearing my json-schema-org hat, I'm still a bit concerned about an extremely popular tool regularly fetching the meta-schemas, especially if that is the default behavior. Happy to do a PR for this if I can sell you on it :-) |
Ok. Should it be an option ( But if your idea is to use modified meta-schema as a substitute for hyper-schema (without changing $schema) which can be valuable for testing you will have name conflict if they are added by default. So maybe an option And maybe even an option |
I definitely like the idea of a switch to disable standard meta schemas, whether that by default includes the meta-hyper-schema or not. In production I expect to use the standard meta-schemas, the modified ones that spoof the standard ids are only for internal dev/test mode. If they were in production they'd make evolving the APIs very difficult because of the strictness. With my JSON Schema spec author hat on, I want to say "implementation should automatically support all standards-defined meta-schemas equally", but thinking from an implementor/validation-only user, I can see not including it. The best argument I can think of for including it is that validating hyper-schemas is still validation and will hopefully be an increasingly common thing, so the UX is nicer if it's supported. But I'm not inclined to dig in on this. I think if it is included, it should be automatic. That keeps UX parity which I think is the main reason to do it, and I can think of why that would be a problem (unless there's some internal performance reason). |
I am not that fussed about what it the default, to include or to skip. The performance impact is negligible in this case. As long as there is an option to control it it's fine. |
Similar to #28, would it be possible to automatically recognize http://json-schema.org/draft-04/hyper-schema and http://json-schema.org/draft-06/hyper-schema as built-in supported meta-schemas?
The text was updated successfully, but these errors were encountered: