diff --git a/doc/cli-directive.md b/doc/cli-directive.md index 86762c3..c221087 100644 --- a/doc/cli-directive.md +++ b/doc/cli-directive.md @@ -62,7 +62,7 @@ For groupName, operationName, parameterName, typeName, propertyName, usually you - add 'json: ...' under 'language->cli'. - add 'x-ms-client-flatten: false' under 'extensions' and 'cli-flatten: false' under 'language->cli' if 'json: true'. - flatten: - - add 'cli-flatten: ..." under 'extensions' + - add 'cli-flatten: ..." under 'language->cli' - formatTable: - add properties information under 'language->cli'. - optional @@ -87,6 +87,10 @@ For groupName, operationName, parameterName, typeName, propertyName, usually you - opName1 - opName2 - ... +- min-api: + - add 'min-api: ..." under 'language->cli' +- max-api: + - add 'max-api: ..." under 'language->cli' ## How to troubleshooting > Add --debug in your command line to have more intermedia output files for troubleshooting diff --git a/package.json b/package.json index 1a481be..9d89ef3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@autorest/clicommon", - "version": "0.5.1", + "version": "0.5.2", "description": "Autorest Azure Cli Common Module", "main": "dist/index.js", "engines": { diff --git a/src/nodeHelper.ts b/src/nodeHelper.ts index 53afa8c..4cd0822 100644 --- a/src/nodeHelper.ts +++ b/src/nodeHelper.ts @@ -17,6 +17,8 @@ export class NodeCliHelper { public static readonly CLI_M4_PATH: string = 'cliM4Path'; public static readonly CLI_PATH: string = 'cliPath'; 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'; private static readonly CLI: string = "cli"; private static readonly NAME: string = "name"; diff --git a/src/plugins/modifier/cliDirectiveAction.ts b/src/plugins/modifier/cliDirectiveAction.ts index 9fe9ccb..f0385c2 100644 --- a/src/plugins/modifier/cliDirectiveAction.ts +++ b/src/plugins/modifier/cliDirectiveAction.ts @@ -39,6 +39,8 @@ export abstract class Action { arr.push(new ActionSetProperty(value, key, () => true)); break; case NodeCliHelper.SPLIT_OPERATION_NAMES: + case NodeCliHelper.CLI_MIN_API: + case NodeCliHelper.CLI_MAX_API: arr.push(new ActionSetProperty(value, key, () => null)); break; case 'delete':