diff --git a/src/vs/workbench/parts/tasks/common/taskDefinitionRegistry.ts b/src/vs/workbench/parts/tasks/common/taskDefinitionRegistry.ts index ae465047702440361fd9d1ed9e8dd9025783c7a0..0a36e9e1d5ceac94f06f18dc98833eebf5b14e38 100644 --- a/src/vs/workbench/parts/tasks/common/taskDefinitionRegistry.ts +++ b/src/vs/workbench/parts/tasks/common/taskDefinitionRegistry.ts @@ -80,6 +80,7 @@ export interface ITaskDefinitionRegistry { get(key: string): Tasks.TaskDefinition; all(): Tasks.TaskDefinition[]; + getJsonSchema(): IJSONSchema; } class TaskDefinitionRegistryImpl implements ITaskDefinitionRegistry { @@ -134,7 +135,13 @@ class TaskDefinitionRegistryImpl implements ITaskDefinitionRegistry { } if (definition.properties !== void 0) { schema.properties = Objects.deepClone(definition.properties); + } else { + schema.properties = Object.create(null); } + schema.properties.type = { + type: 'string', + enum: [definition.taskType] + }; schemas.push(schema); } this._schema = { oneOf: schemas };