Skip to content

404 when attempting to access http://json-schema.org/schema (don't attempt to access it) #195190

@gregsdennis

Description

@gregsdennis

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: any
  • OS Version: any

Steps to Reproduce:

  1. Open a new editor file with JSON selected as the language
  2. Paste
    {
      "$schema": "http://json-schema.org/schema"
    }

Reported here (github), here (slack), and here (github).

This error is due to a revamped https://json-schema.org where we are only hosting HTTPS content. I believe we are serving a 301 from the meta-schema URLs, though.

Problems:

  1. http://json-schema.org/schema should never be used to identify a meta-schema. This is not a valid meta-schema URI. Historically this URL hosted the latest meta-schema, but that led to unpredictable behaviors as new versions were released and the "latest" was updated, so we decided to remove it.
  2. The value of $schema is to be interpreted as a URI, not a URL. If the value happens to also be a URL, it is not to be interpreted to actually be at that location. It is an identifier only.
  3. Implementations (including editors) should not be downloading well-known meta-schemas. They should be packaged with the implementation. (@6nv, does the problem still occur if you use http://json-schema.org/draft-07/schema# or another well-known meta-schema URI?)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions