From 8228416ff27a9d59b1bc7c420768fa7b60fee212 Mon Sep 17 00:00:00 2001 From: andrew <69653137+greenms@users.noreply.github.com> Date: Tue, 16 Feb 2021 19:35:00 -0800 Subject: [PATCH] Update redisenterprise readme files for C#, Azure CLI, and Azure Resource Manager Schema (#12943) * Update readme files for csharp, az cli, and azureresourceschema * Fix spelling mistake * Fix bug from issue 744 * Add newline to end of readme files * First round of updates for Azure CLI code generation --- .../resource-manager/readme.az.md | 50 +++++++++++++++++++ .../readme.azureresourceschema.md | 12 +++++ .../resource-manager/readme.cli.md | 4 ++ .../resource-manager/readme.csharp.md | 11 ++++ .../resource-manager/readme.go.md | 2 +- .../resource-manager/readme.md | 2 + 6 files changed, 80 insertions(+), 1 deletion(-) create mode 100644 specification/redisenterprise/resource-manager/readme.az.md create mode 100644 specification/redisenterprise/resource-manager/readme.cli.md diff --git a/specification/redisenterprise/resource-manager/readme.az.md b/specification/redisenterprise/resource-manager/readme.az.md new file mode 100644 index 000000000000..79f399d7b5e9 --- /dev/null +++ b/specification/redisenterprise/resource-manager/readme.az.md @@ -0,0 +1,50 @@ +## AZ + +These settings apply only when `--az` is specified on the command line. + +``` yaml $(az) && $(target-mode) != 'core' +az: + extensions: redisenterprise + namespace: azure.mgmt.redisenterprise + package-name: azure-mgmt-redisenterprise +az-output-folder: $(azure-cli-extension-folder)/src/redisenterprise +python-sdk-output-folder: "$(az-output-folder)/azext_redisenterprise/vendored_sdks/redisenterprise" +``` +``` yaml $(az) && $(target-mode) == 'core' +az: + extensions: redisenterprise + namespace: azure.mgmt.redisenterprise + package-name: azure-mgmt-redisenterprise +az-output-folder: $(azure-cli-folder)/src/azure-cli/azure/cli/command_modules/redisenterprise +python-sdk-output-folder: "$(az-output-folder)/vendored_sdks/redisenterprise" +``` + +Additional configuration specific for Azure CLI + +``` yaml +extension-mode: stable + +cli: + cli-directive: + - where: + group: '*' + op: '*' + param: 'clusterName' + alias: + - cluster_name + - name + - n + - where: + group: '*' + op: '*' + param: 'zones' + alias: + - zones + - z + +directive: + - where: + group: redisenterprise redis-enterprise + set: + group: redisenterprise +``` diff --git a/specification/redisenterprise/resource-manager/readme.azureresourceschema.md b/specification/redisenterprise/resource-manager/readme.azureresourceschema.md index afc5a2515111..2b4156403c0f 100644 --- a/specification/redisenterprise/resource-manager/readme.azureresourceschema.md +++ b/specification/redisenterprise/resource-manager/readme.azureresourceschema.md @@ -6,12 +6,24 @@ These settings apply only when `--azureresourceschema` is specified on the comma ``` yaml $(azureresourceschema) && $(multiapi) batch: + - tag: schema-cache-2021-03-01 - tag: schema-cache-2020-10-01-preview ``` Please also specify `--azureresourceschema-folder=`. +### Tag: schema-cache-2021-03-01 and azureresourceschema + +``` yaml $(tag) == 'schema-cache-2021-03-01' && $(azureresourceschema) +output-folder: $(azureresourceschema-folder)/schemas + +# all the input files in this apiVersion +input-file: + - Microsoft.Cache/stable/2021-03-01/redisenterprise.json + +``` + ### Tag: schema-cache-2020-10-01-preview and azureresourceschema ``` yaml $(tag) == 'schema-cache-2020-10-01-preview' && $(azureresourceschema) diff --git a/specification/redisenterprise/resource-manager/readme.cli.md b/specification/redisenterprise/resource-manager/readme.cli.md new file mode 100644 index 000000000000..73967f0e71c8 --- /dev/null +++ b/specification/redisenterprise/resource-manager/readme.cli.md @@ -0,0 +1,4 @@ +``` yaml +# add any configuration here for all CLI languages +# refer to the faq.md for more details +``` diff --git a/specification/redisenterprise/resource-manager/readme.csharp.md b/specification/redisenterprise/resource-manager/readme.csharp.md index c091d56643f8..d2a1eeed885d 100644 --- a/specification/redisenterprise/resource-manager/readme.csharp.md +++ b/specification/redisenterprise/resource-manager/readme.csharp.md @@ -12,4 +12,15 @@ csharp: client-side-validation: false namespace: Microsoft.Azure.Management.RedisEnterprise output-folder: $(csharp-sdks-folder)/redisenterprise/Microsoft.Azure.Management.RedisEnterprise/src/Generated + +directive: + # Rename constants in the generated code + - from: source-file-csharp + where: $ + transform: >- + return $. + replace( /public const string Ones /g, "public const string OneSecond " ). + replace( /public const string Oneh /g, "public const string OneHour " ). + replace( /public const string Sixh /g, "public const string SixHours " ). + replace( /public const string OneTwoh /g, "public const string TwelveHours " ) ``` diff --git a/specification/redisenterprise/resource-manager/readme.go.md b/specification/redisenterprise/resource-manager/readme.go.md index 4921d06f8e85..f7153c1e4564 100644 --- a/specification/redisenterprise/resource-manager/readme.go.md +++ b/specification/redisenterprise/resource-manager/readme.go.md @@ -33,4 +33,4 @@ Please also specify `--go-sdk-folder=