question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support $schema reference to JSON schema

See original GitHub issue

Currently 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:closed
  • Created 4 years ago
  • Reactions:13
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

6reactions
apupiercommented, Jul 24, 2020

implemented using # yaml-language-server: $schema=http://some.org/schema format

2reactions
ssbarneacommented, Jul 16, 2020

Lets open a sister ticket on YAML meta repository itself, maybe YAML spec authors can help us make a good/future proof decision?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found