提交 57213395 编写于 作者: A Alex Dima

Mark `args` are required if necessary (#66458)

上级 c38240c3
......@@ -631,6 +631,7 @@ function updateSchema() {
}
const argsSchema = commandDescription.args[0].schema;
const argsRequired = Array.isArray(argsSchema.required) && argsSchema.required.length > 0;
const addition = {
'if': {
'properties': {
......@@ -638,6 +639,7 @@ function updateSchema() {
}
},
'then': {
'required': [].concat(argsRequired ? ['args'] : []),
'properties': {
'args': argsSchema
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册