From cdabfe20bae2016c5026bea65474b48996a0d07a Mon Sep 17 00:00:00 2001 From: Federico Bozzini Date: Tue, 4 Apr 2023 16:49:53 +0100 Subject: [PATCH 1/2] Update json schema URL --- packages/core/src/browser/json-schema-store.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/src/browser/json-schema-store.ts b/packages/core/src/browser/json-schema-store.ts index 06e30099453f7..f65f76bc681c4 100644 --- a/packages/core/src/browser/json-schema-store.ts +++ b/packages/core/src/browser/json-schema-store.ts @@ -100,7 +100,7 @@ export class DefaultJsonSchemaContribution implements JsonSchemaContribution { protected readonly requestService: RequestService; async registerSchemas(context: JsonSchemaRegisterContext): Promise { - const url = `${new Endpoint().httpScheme}//schemastore.azurewebsites.net/api/json/catalog.json`; + const url = `${new Endpoint().httpScheme}//schemastore.org/api/json/catalog.json`; const response = await this.requestService.request({ url }); const schemas = RequestContext.asJson<{ schemas: DefaultJsonSchemaContribution.SchemaData[] }>(response).schemas; for (const s of schemas) { From 255649d6e691c9c52099782ad3bb84834abdd800 Mon Sep 17 00:00:00 2001 From: Federico Bozzini Date: Tue, 11 Apr 2023 11:44:10 +0100 Subject: [PATCH 2/2] Improve overridability Signed-off-by: Federico Bozzini --- packages/core/src/browser/json-schema-store.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/core/src/browser/json-schema-store.ts b/packages/core/src/browser/json-schema-store.ts index f65f76bc681c4..743c4dc50b741 100644 --- a/packages/core/src/browser/json-schema-store.ts +++ b/packages/core/src/browser/json-schema-store.ts @@ -99,9 +99,10 @@ export class DefaultJsonSchemaContribution implements JsonSchemaContribution { @inject(RequestService) protected readonly requestService: RequestService; + protected readonly jsonSchemaUrl = `${new Endpoint().httpScheme}//schemastore.org/api/json/catalog.json`; + async registerSchemas(context: JsonSchemaRegisterContext): Promise { - const url = `${new Endpoint().httpScheme}//schemastore.org/api/json/catalog.json`; - const response = await this.requestService.request({ url }); + const response = await this.requestService.request({ url: this.jsonSchemaUrl }); const schemas = RequestContext.asJson<{ schemas: DefaultJsonSchemaContribution.SchemaData[] }>(response).schemas; for (const s of schemas) { if (s.fileMatch) {