Merge pull request #53 from Azure/more-shortcut-directive
add directive shortcut for description and default-value
This commit is contained in:
Коммит
9582cb338b
|
@ -293,6 +293,12 @@ cli:
|
|||
- name:
|
||||
- add 'name: ...' under 'language->cli'. Please make sure **snake_naming_convention** is used
|
||||
- optional
|
||||
- description:
|
||||
- add 'description: ...' under 'language->cli'.
|
||||
- optional
|
||||
- default-value:
|
||||
- add 'default-value: ...' under 'language->cli'
|
||||
- optional
|
||||
- hidden:
|
||||
- add 'hidden: ...' under 'language->cli'.
|
||||
- optional
|
||||
|
@ -340,6 +346,7 @@ cli:
|
|||
where:
|
||||
operationGroup: 'OldName'
|
||||
name: 'new_name'
|
||||
description: 'new description'
|
||||
- where:
|
||||
resource: 'OldName'
|
||||
hidden: true
|
||||
|
@ -366,6 +373,7 @@ cli:
|
|||
op: 'OperationName'
|
||||
param: 'ParameterName'
|
||||
required: true
|
||||
default-value: 'default value of the param'
|
||||
# add hidden property for all parameter start with 'abc'
|
||||
- where:
|
||||
parameter: '^abc.*$'
|
||||
|
|
|
@ -39,6 +39,8 @@ export abstract class Action {
|
|||
break;
|
||||
case 'name':
|
||||
case 'alias':
|
||||
case 'description':
|
||||
case 'default-value':
|
||||
arr.push(new ActionSetProperty(value, key, () => { throw Error(`${key} missing in directive`) }))
|
||||
break;
|
||||
case 'replace':
|
||||
|
|
|
@ -121,6 +121,8 @@ export namespace CliCommonSchema {
|
|||
"poly-resource"?: ValueClause;
|
||||
hitCount?: ValueClause;
|
||||
name?: ValueClause;
|
||||
description?: ValueClause;
|
||||
"default-value"?: ValueClause;
|
||||
/** in kebab-case */
|
||||
setName?: SetNameClause;
|
||||
replace?: ReplaceClause;
|
||||
|
|
Загрузка…
Ссылка в новой задаче