Skip to content

feat: schema store support - #327297

Closed
Vincent Biret (baywet) wants to merge 1 commit into
microsoft:aeschli/asleep-lynx-707from
baywet:feat/schema-store-contributes
Closed

feat: schema store support#327297
Vincent Biret (baywet) wants to merge 1 commit into
microsoft:aeschli/asleep-lynx-707from
baywet:feat/schema-store-contributes

Conversation

@baywet

Copy link
Copy Markdown
Member

closes #325970 depends on #327104

@vs-code-engineering

Copy link
Copy Markdown
Contributor

📬 CODENOTIFY

The following users are being notified based on files changed in this PR:

Raymond Zhao (@rzhao271)

Matched files:

  • src/vs/workbench/contrib/preferences/common/settingsFilesystemProvider.ts

@baywet Vincent Biret (baywet) changed the title feat/schema store contributes feat: schema store support Jul 24, 2026
@baywet
Vincent Biret (baywet) changed the base branch from main to aeschli/asleep-lynx-707 July 24, 2026 13:58

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds dynamic JSON validation registries and SchemaStore catalog support to the JSON language features extension.

Changes:

  • Registers and validates the jsonValidationRegistry contribution point.
  • Loads, watches, and refreshes local and remote schema registries.
  • Converts internal schema associations to catalog format.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
extensionPoints.json Registers the contribution point.
extensionManifestPropertiesService.ts Allows it in the Sessions window.
settingsFilesystemProvider.ts Emits catalog-formatted associations.
jsonValidationExtensionPoint.ts Defines and validates registry contributions.
AI_CUSTOMIZATIONS.md Adds unrelated migration documentation.
extensions.ts Adds contribution manifest types.
package.json Contributes local and SchemaStore registries.
jsonClient.ts Loads, watches, and refreshes registries.
Comments suppressed due to low confidence (3)

extensions/json-language-features/client/src/jsonClient.ts:559

  • The generation check only suppresses a stale notification; getSchemaAssociations(true) replaces the shared cache before the request finishes. If an older refresh completes after a newer one, it overwrites schemaAssociationsCache with stale extension/registry data even though its notification is skipped. Compute into a local value and commit both the cache and notification only for the current generation.
			const associations = await getSchemaAssociations(true);
			if (generation === schemaAssociationRefreshGeneration) {
				client.sendNotification(SchemaAssociationNotification.type, associations);
			}

extensions/json-language-features/client/src/jsonClient.ts:890

  • SchemaStore catalog entries are forwarded as ordinary associations. The dependent vscode-json-languageservice#342 change only gives explicit $schema and configured schemas precedence when an association has source: 'schemaStore'; without that marker, catalog schemas can be combined with explicit/configured schemas and produce conflicting diagnostics. Preserve a registry kind/source through the contribution API and emit it here, while leaving the dynamic vscode://schemas-associations registry as a normal association.
						result.push({
							fileMatch: schema.fileMatch,
							uri: schema.url
						});

extensions/json-language-features/client/src/jsonClient.ts:862

  • registrys is a misspelling and makes the collection name harder to scan. Use the standard plural registries consistently.
		const registrys = extension.packageJSON?.contributes?.jsonValidationRegistry;
		if (Array.isArray(registrys)) {
			for (const registry of registrys) {

Comment on lines +812 to +814
async function computeSchemaAssociations(getRegistryContent: (uri: string) => Promise<string>): Promise<ISchemaAssociation[]> {
const extensionAssociations = getSchemaExtensionAssociations();
return extensionAssociations.concat(await getSchemaRegistryAssociations());
return extensionAssociations.concat(await getSchemaRegistryAssociations(getRegistryContent));
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

Successfully merging this pull request may close these issues.

3 participants