Skip to content

Commit

Permalink
Update redisenterprise readme files for C#, Azure CLI, and Azure Reso…
Browse files Browse the repository at this point in the history
…urce 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
  • Loading branch information
greenms authored Feb 17, 2021
1 parent 8c5be20 commit 8228416
Show file tree
Hide file tree
Showing 6 changed files with 80 additions and 1 deletion.
50 changes: 50 additions & 0 deletions specification/redisenterprise/resource-manager/readme.az.md
Original file line number Diff line number Diff line change
@@ -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
```
Original file line number Diff line number Diff line change
Expand Up @@ -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=<path to the root directory of your azure-resource-manager-schemas clone>`.

### 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)
Expand Down
4 changes: 4 additions & 0 deletions specification/redisenterprise/resource-manager/readme.cli.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
``` yaml
# add any configuration here for all CLI languages
# refer to the faq.md for more details
```
11 changes: 11 additions & 0 deletions specification/redisenterprise/resource-manager/readme.csharp.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 " )
```
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ Please also specify `--go-sdk-folder=<path to the root directory of your azure-s

```yaml $(tag) == 'package-2020-10-01-preview' && $(go)
output-folder: $(go-sdk-folder)/services/preview/$(namespace)/mgmt/2020-10-01-preview/$(namespace)
```
```
2 changes: 2 additions & 0 deletions specification/redisenterprise/resource-manager/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ swagger-to-sdk:
- repo: azure-sdk-for-ruby
after_scripts:
- bundle install && rake arm:regen_all_profiles['azure_mgmt_redisenterprise']
- repo: azure-resource-manager-schemas
- repo: azure-cli-extensions
```

## Go
Expand Down

0 comments on commit 8228416

Please sign in to comment.