-
-
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
Inline schema #647
Comments
There's nothing currently stopping this- we (the JSON Schema project) cannot change regular JSON (the We do define Most validators don't care where the schema comes from, so grabbing it from a I might recommend something like |
Here are valid documents of the type
None of them include a schema. Here are a bunch of JSON files including schema information:
Is there a more formal definition of "JSON files including schema information"? Is there a mime type? That is where I am looking to open this issue. Currently, the convention (recognized by who?, documented where?) is that a |
Nope.
Nope, you could work on one and register it, though.
In JSON Schema ( In non-schema JSON files, some people seem to use I would recommend against using a property name that is a JSON Schema keyword in a way that conflicts with its definition in JSON Schema, while also somehow related to JSON Schema, because that's incredibly confusing. I'm confused even writing that sentence. So if you want novel behavior, pick a new property name. Any way you look at this, it is outside of the scope of the JSON Schema project. Anyone is welcome to define a media type that uses JSON Schema in some way, including ways not specified by the JSON Schema spec. See OpenAPI, or W3C WoT's "Thing Description" format, both of which embed JSON Schemas. Those are description formats which build on JSON Schema rather than formats that use the schema to describe the files themselves, but either way, the media type defines how it uses JSON Schema which is valid. I believe the spacetelescope "Understanding JSON Schema" guide, which recently moved under this org (at https://github.com/json-schema-org/understanding-json-schema ) might give the It is definitely not a part of the JSON Schema specification, which is what this repo is for, so I'm closing this here. |
Got it, and thank you, understood loud and clear. |
I am requesting that it be legal to inline a full JSON schema into a JSON document by including the schema itself as the value for the
$schema
key, rather than referencing an external file.Why would anybody want to includ their data format specification in the same file as their data?
I don't know but, that is the current state of the art for:
Perhaps it sounds like a ridiculous suggestion, but actually this is how most people are currently accustomed to sending data files.
With inline schema, we can now ask everyone that is currently exporting XLS to also support JSON+Schema files. This saves them from having to worry about exporting a dataset that produces two files.
The text was updated successfully, but these errors were encountered: