mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 21:09:43 +00:00
add JSON schema for extensionEnabledApiProposals
, fyi @aeschli
This commit is contained in:
parent
b5d3ec5b49
commit
3441d36d84
|
@ -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"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
|
@ -13,3 +13,6 @@ export interface IProductService extends Readonly<IProductConfiguration> {
|
|||
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 { 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<IJSONContributionRegistry>(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)
|
||||
}
|
||||
}]
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue