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

When downloading JSON Schema files, do Conditional GETs #308

Open
madskristensen opened this issue Jun 25, 2020 · 2 comments
Open

When downloading JSON Schema files, do Conditional GETs #308

madskristensen opened this issue Jun 25, 2020 · 2 comments

Comments

@madskristensen
Copy link

The requests coming in for JSON Schema files to SchemaStore.org don't check if the remote files have changed before downloading them. This puts unneeded pressure on the SchemaStore.org servers and it downloads more data than needed which will cost money for users that pay bandwidth by the megabyte.

By supporting Conditional GETs (HTTP 304) using either If-Modified-Since or If-None-Match request header, these issues are fixed.

Also opened at microsoft/vscode#101050 for the VS Code JSON editor extension

@apupier
Copy link
Member

apupier commented Jul 23, 2020

@JPinkney is there something to do on VS Code yaml or Yaml-language-server side? or it is relying on the VS Code Json/Json Language server for downloading the schemas?

@JPinkney
Copy link
Contributor

JPinkney commented Jul 23, 2020

On the yaml language server side we just grab the list of schemas and send them to be loaded. When they're loaded I believe its https://github.com/microsoft/vscode-json-languageservice/blob/908ede3fd3c3b1e1c2f5f9b96ad9c4056e8fb1d0/src/services/jsonSchemaService.ts#L360 that actually resolves the schema content

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

No branches or pull requests

3 participants