Support $schema reference to JSON schema
See original GitHub issueCurrently JSON schema for a YAML file must be specified externally, either via settings or from the public schema store.
I’d like to be able to specify the schema to use in the YAML document itself. This is possible with JSON documents by specifying a $schema property, e.g.
{
"$schema": "http://some.org/schema",
"prop1": "value1"
...
}
It seems reasonable to me that the same convention could be supported for YAML documents (as this is defined as part of the JSON schema spec itself):
$schema: http://some.org/schema
prop1: value1
...
Issue Analytics
- State:
- Created 4 years ago
- Reactions:13
- Comments:7 (6 by maintainers)
Top Results From Across the Web
JSON Schema | The home of JSON Schema
JSON Schema is hypermedia ready, and ideal for annotating your existing JSON-based HTTP API. JSON Schema documents are identified by URIs, which can...
Read more >Structuring a complex schema — Understanding JSON ...
A schema can reference another schema using the $ref keyword. The value of $ref is a URI-reference that is resolved against the schema's...
Read more >Understanding JSON Schema 2020-12 documentation
JSON Schema Reference ¶. Type-specific keywords · string · Regular Expressions · Numeric types · object · array · boolean · null ·...
Read more >Getting Started Step-By-Step - JSON Schema
To start a schema definition, let's begin with a basic JSON schema. We start with four properties called keywords which are expressed as...
Read more >Declaring a Dialect — Understanding JSON Schema 2020-12 ...
The $schema keyword is used to declare which dialect of JSON Schema the schema was written for. The value of the $schema keyword...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
implemented using
# yaml-language-server: $schema=http://some.org/schema
formatLets open a sister ticket on YAML meta repository itself, maybe YAML spec authors can help us make a good/future proof decision?