提交 deb7a38b 编写于 作者: I isidor

tasks definition schema add "type" property

上级 bc6c148a
......@@ -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 };
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册