-
-
Notifications
You must be signed in to change notification settings - Fork 298
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
Update spec requirements around using a default dialect #1343
Comments
Should we leave/add provision for an implementation to offer a configuration option for a fallback dialect (which defaults to the standard validation dialect)? |
Yes. I expect that the dialect can be declared in multiple ways. The |
As far as the configuration option is concerned, I would expect it to not override anything that's in a schema. |
Right, I was expecting the question of how a dialect can be declared as a separate topic, but I don't think it had an entry in my original todo list. I expect that |
... if media type parameter exists. My implementation doesn't consider media types; it deals with only content, irrespective of where that content comes from. |
@gregsdennis typically this would be handled by a normative requirement to accept a meta-schema URI from an external source, rather than requiring the JSON Schema implementation to be media-type aware. Some other piece of software would parse the media type and then hand off the schema and the URI from the |
Media types only come into play if you retrieve a schema over HTTP. Otherwise, media types and media type parameters don't apply. If you do fetch over HTTP and you are ignoring the content type of the response, I'd consider that a problem. However, although most implementations I've worked with support fetching over HTTP, very few handle media types properly.
That only works for the root schema. If the implementation allows fetching references over HTTP, the fetching mechanism and media type awareness need to be built into the implementation. |
Reference fetching is often a plug-in architecture, and it's more that the plug-in interface needs to accept the media type (which can indeed exist in systems other than HTTP). The HTTP plugin will of course handle the media type, and if you bundle that into the implementation then, yeah, there's "implementation code" for it, but we should keep in mind that even if there is not a true plugin system, implementations aren't monoliths. The requirements for loading and processing schemas need not be conflated with requirements for retrieving remote resources. |
It was decided that we are going to put off having a default dialect for now, so I'm replacing this with #1420 |
Implementations need to use the standard validation dialect when none is specified by the schema.
The text was updated successfully, but these errors were encountered: