Path: blob/main/src/vs/workbench/services/configurationResolver/common/configurationResolverSchema.ts
3296 views
/*---------------------------------------------------------------------------------------------1* Copyright (c) Microsoft Corporation. All rights reserved.2* Licensed under the MIT License. See License.txt in the project root for license information.3*--------------------------------------------------------------------------------------------*/45import * as nls from '../../../../nls.js';6import { IJSONSchema } from '../../../../base/common/jsonSchema.js';78const idDescription = nls.localize('JsonSchema.input.id', "The input's id is used to associate an input with a variable of the form ${input:id}.");9const typeDescription = nls.localize('JsonSchema.input.type', "The type of user input prompt to use.");10const descriptionDescription = nls.localize('JsonSchema.input.description', "The description is shown when the user is prompted for input.");11const defaultDescription = nls.localize('JsonSchema.input.default', "The default value for the input.");121314export const inputsSchema: IJSONSchema = {15definitions: {16inputs: {17type: 'array',18description: nls.localize('JsonSchema.inputs', 'User inputs. Used for defining user input prompts, such as free string input or a choice from several options.'),19items: {20oneOf: [21{22type: 'object',23required: ['id', 'type', 'description'],24additionalProperties: false,25properties: {26id: {27type: 'string',28description: idDescription29},30type: {31type: 'string',32description: typeDescription,33enum: ['promptString'],34enumDescriptions: [35nls.localize('JsonSchema.input.type.promptString', "The 'promptString' type opens an input box to ask the user for input."),36]37},38description: {39type: 'string',40description: descriptionDescription41},42default: {43type: 'string',44description: defaultDescription45},46password: {47type: 'boolean',48description: nls.localize('JsonSchema.input.password', "Controls if a password input is shown. Password input hides the typed text."),49},50}51},52{53type: 'object',54required: ['id', 'type', 'description', 'options'],55additionalProperties: false,56properties: {57id: {58type: 'string',59description: idDescription60},61type: {62type: 'string',63description: typeDescription,64enum: ['pickString'],65enumDescriptions: [66nls.localize('JsonSchema.input.type.pickString', "The 'pickString' type shows a selection list."),67]68},69description: {70type: 'string',71description: descriptionDescription72},73default: {74type: 'string',75description: defaultDescription76},77options: {78type: 'array',79description: nls.localize('JsonSchema.input.options', "An array of strings that defines the options for a quick pick."),80items: {81oneOf: [82{83type: 'string'84},85{86type: 'object',87required: ['value'],88additionalProperties: false,89properties: {90label: {91type: 'string',92description: nls.localize('JsonSchema.input.pickString.optionLabel', "Label for the option.")93},94value: {95type: 'string',96description: nls.localize('JsonSchema.input.pickString.optionValue', "Value for the option.")97}98}99}100]101}102}103}104},105{106type: 'object',107required: ['id', 'type', 'command'],108additionalProperties: false,109properties: {110id: {111type: 'string',112description: idDescription113},114type: {115type: 'string',116description: typeDescription,117enum: ['command'],118enumDescriptions: [119nls.localize('JsonSchema.input.type.command', "The 'command' type executes a command."),120]121},122command: {123type: 'string',124description: nls.localize('JsonSchema.input.command.command', "The command to execute for this input variable.")125},126args: {127oneOf: [128{129type: 'object',130description: nls.localize('JsonSchema.input.command.args', "Optional arguments passed to the command.")131},132{133type: 'array',134description: nls.localize('JsonSchema.input.command.args', "Optional arguments passed to the command.")135},136{137type: 'string',138description: nls.localize('JsonSchema.input.command.args', "Optional arguments passed to the command.")139}140]141}142}143}144]145}146}147}148};149150151