diff --git a/extensions/configuration-editing/package.json b/extensions/configuration-editing/package.json index aabe3c00212..a7b71cd05c8 100644 --- a/extensions/configuration-editing/package.json +++ b/extensions/configuration-editing/package.json @@ -51,9 +51,9 @@ ".devcontainer.json" ], "filenamePatterns": [ - "**/.devcontainer/devcontainer.json", + "**/.devcontainer/devcontainer.json", "**/User/snippets/*.json" - ] + ] } ], "jsonValidation": [ @@ -136,6 +136,10 @@ { "fileMatch": "%APP_SETTINGS_HOME%/globalStorage/ms-vscode-remote.remote-containers/imageConfigs/*.json", "url": "./schemas/attachContainer.schema.json" + }, + { + "fileMatch": "**/quality/*/product.json", + "url": "vscode://schemas/vscode-product" } ] }, diff --git a/src/vs/platform/product/common/productService.ts b/src/vs/platform/product/common/productService.ts index fcb9108cb9c..c819c5caa1d 100644 --- a/src/vs/platform/product/common/productService.ts +++ b/src/vs/platform/product/common/productService.ts @@ -13,3 +13,6 @@ export interface IProductService extends Readonly { readonly _serviceBrand: undefined; } + + +export const productSchemaId = 'vscode://schemas/vscode-product'; diff --git a/src/vs/workbench/services/extensions/common/extensionsRegistry.ts b/src/vs/workbench/services/extensions/common/extensionsRegistry.ts index 7804f575dc3..7ade0916dd0 100644 --- a/src/vs/workbench/services/extensions/common/extensionsRegistry.ts +++ b/src/vs/workbench/services/extensions/common/extensionsRegistry.ts @@ -14,6 +14,7 @@ import { IMessage } from 'vs/workbench/services/extensions/common/extensions'; import { ExtensionIdentifier, IExtensionDescription, EXTENSION_CATEGORIES, ExtensionKind } from 'vs/platform/extensions/common/extensions'; import { allApiProposals } from 'vs/workbench/services/extensions/common/extensionsApiProposals'; import { values } from 'vs/base/common/collections'; +import { productSchemaId } from 'vs/platform/product/common/productService'; const schemaRegistry = Registry.as(Extensions.JSONContribution); @@ -566,3 +567,29 @@ Registry.add(PRExtensions.ExtensionsRegistry, new ExtensionsRegistryImpl()); export const ExtensionsRegistry: ExtensionsRegistryImpl = Registry.as(PRExtensions.ExtensionsRegistry); schemaRegistry.registerSchema(schemaId, schema); + + +schemaRegistry.registerSchema(productSchemaId, { + properties: { + extensionAllowedProposedApi: { + type: 'array', + deprecationMessage: nls.localize('product.extensionAllowedProposedApi', "Use `extensionEnabledApiProposals` instead.") + }, + extensionEnabledApiProposals: { + description: nls.localize('product.extensionEnabledApiProposals', "API proposals that the respective extensions can freely use."), + type: 'object', + properties: {}, + additionalProperties: { + anyOf: [{ + type: 'array', + uniqueItems: true, + items: { + type: 'string', + enum: Object.keys(allApiProposals), + markdownEnumDescriptions: values(allApiProposals) + } + }] + } + } + } +});