mirror of
https://github.com/Microsoft/vscode
synced 2024-08-28 05:19:39 +00:00
add JSON schema for extensionEnabledApiProposals
, fyi @aeschli
This commit is contained in:
parent
b5d3ec5b49
commit
3441d36d84
|
@ -51,9 +51,9 @@
|
||||||
".devcontainer.json"
|
".devcontainer.json"
|
||||||
],
|
],
|
||||||
"filenamePatterns": [
|
"filenamePatterns": [
|
||||||
"**/.devcontainer/devcontainer.json",
|
"**/.devcontainer/devcontainer.json",
|
||||||
"**/User/snippets/*.json"
|
"**/User/snippets/*.json"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"jsonValidation": [
|
"jsonValidation": [
|
||||||
|
@ -136,6 +136,10 @@
|
||||||
{
|
{
|
||||||
"fileMatch": "%APP_SETTINGS_HOME%/globalStorage/ms-vscode-remote.remote-containers/imageConfigs/*.json",
|
"fileMatch": "%APP_SETTINGS_HOME%/globalStorage/ms-vscode-remote.remote-containers/imageConfigs/*.json",
|
||||||
"url": "./schemas/attachContainer.schema.json"
|
"url": "./schemas/attachContainer.schema.json"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fileMatch": "**/quality/*/product.json",
|
||||||
|
"url": "vscode://schemas/vscode-product"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
|
@ -13,3 +13,6 @@ export interface IProductService extends Readonly<IProductConfiguration> {
|
||||||
readonly _serviceBrand: undefined;
|
readonly _serviceBrand: undefined;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
export const productSchemaId = 'vscode://schemas/vscode-product';
|
||||||
|
|
|
@ -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 { ExtensionIdentifier, IExtensionDescription, EXTENSION_CATEGORIES, ExtensionKind } from 'vs/platform/extensions/common/extensions';
|
||||||
import { allApiProposals } from 'vs/workbench/services/extensions/common/extensionsApiProposals';
|
import { allApiProposals } from 'vs/workbench/services/extensions/common/extensionsApiProposals';
|
||||||
import { values } from 'vs/base/common/collections';
|
import { values } from 'vs/base/common/collections';
|
||||||
|
import { productSchemaId } from 'vs/platform/product/common/productService';
|
||||||
|
|
||||||
const schemaRegistry = Registry.as<IJSONContributionRegistry>(Extensions.JSONContribution);
|
const schemaRegistry = Registry.as<IJSONContributionRegistry>(Extensions.JSONContribution);
|
||||||
|
|
||||||
|
@ -566,3 +567,29 @@ Registry.add(PRExtensions.ExtensionsRegistry, new ExtensionsRegistryImpl());
|
||||||
export const ExtensionsRegistry: ExtensionsRegistryImpl = Registry.as(PRExtensions.ExtensionsRegistry);
|
export const ExtensionsRegistry: ExtensionsRegistryImpl = Registry.as(PRExtensions.ExtensionsRegistry);
|
||||||
|
|
||||||
schemaRegistry.registerSchema(schemaId, schema);
|
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)
|
||||||
|
}
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
Loading…
Reference in a new issue