Skip to content
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

JSON Schema meta-schemas should not be downloaded #212

Open
gregsdennis opened this issue Oct 10, 2023 · 0 comments
Open

JSON Schema meta-schemas should not be downloaded #212

gregsdennis opened this issue Oct 10, 2023 · 0 comments

Comments

@gregsdennis
Copy link

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant