Skip to content
This repository has been archived by the owner on Dec 15, 2023. It is now read-only.

Commit

Permalink
resource-type (#101)
Browse files Browse the repository at this point in the history
* resource-type

* version 0.5.6

Co-authored-by: Changlong Liu <[email protected]>
  • Loading branch information
changlong-liu and Changlong Liu authored Nov 6, 2020
1 parent ce58424 commit 209df41
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 1 deletion.
9 changes: 9 additions & 0 deletions doc/cli-directive.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ For groupName, operationName, parameterName, typeName, propertyName, usually you
- add 'min-api: ..." under 'language->cli'
- max-api:
- add 'max-api: ..." under 'language->cli'
- resource-type:
- add 'resource-type: ..." under 'language->cli'
- value:
- set static value for example dotPath
- eval:
Expand Down Expand Up @@ -222,6 +224,13 @@ cli:
op: CreateOrUpdate#Update
param: properties
cli-flatten: true
# set resource-type/max-api/min-api
- where:
group: OperationGroupName
op: Delete
- max-api: '2019-01-01'
- max-api: '2018-01-01'
- resource-type: 'DATA_STORAGE_BLOB'
# set example content with static value
- where:
exampleName: TheExampleName
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@autorest/clicommon",
"version": "0.5.5",
"version": "0.5.6",
"description": "Autorest Azure Cli Common Module",
"main": "dist/index.js",
"engines": {
Expand Down
1 change: 1 addition & 0 deletions src/nodeHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export class NodeCliHelper {
public static readonly CLI_FLATTEN_TRACE: string = 'cliFlattenTrace';
public static readonly CLI_MIN_API: string = 'min-api';
public static readonly CLI_MAX_API: string = 'max-api';
public static readonly CLI_RESOURCE_TYPE: string = 'resource-type';

private static readonly CLI: string = "cli";
private static readonly NAME: string = "name";
Expand Down
1 change: 1 addition & 0 deletions src/plugins/modifier/cliDirectiveAction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ export abstract class Action {
case NodeCliHelper.SPLIT_OPERATION_NAMES:
case NodeCliHelper.CLI_MIN_API:
case NodeCliHelper.CLI_MAX_API:
case NodeCliHelper.CLI_RESOURCE_TYPE:
arr.push(new ActionSetProperty(value, key, () => null));
break;
case 'delete':
Expand Down

0 comments on commit 209df41

Please sign in to comment.