Skip to content

JSON Schema meta-schemas should not be downloaded #212

Open

Description

Following on from microsoft/vscode#195189, JSON Schema strongly recommends that implementations (including editors like this one) do not automatically download references, including meta-schemas.

Specifically, well-known meta-schemas should be packaged with the implementation.

  • http://json-schema.org/draft-04/schema#
  • http://json-schema.org/draft-06/schema#
  • http://json-schema.org/draft-07/schema#
  • https://json-schema.org/draft/2019-09/schema
  • https://json-schema.org/draft/2020-12/schema

It has been noted in the issue linked above that draft 4 and draft 7 meta-schemas are not downloaded, which is great. However as the others are used, VSCode's downloading of these files can apply considerable load on the JSON Schema website.

Further, URIs found in $id, $schema, and $ref are identifiers only, even when they happen to be URLs. JSON Schema generally discourages the interpretation of these as locators.

Understandably, if an unknown meta-schema is specified with $schema, an effort should be made to acquire it. In these cases, I recommend that an alert be surfaced to the user so that they can make the determination to attempt to download unknown meta-schemas. Any automatic download feature, if provided at all, should be disabled by default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    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