From 0486181fa12211c13cc5a28edc43b6544fda3f5d Mon Sep 17 00:00:00 2001 From: Tianen <347142915@qq.com> Date: Tue, 3 Nov 2020 19:04:29 +0800 Subject: [PATCH] task1212475-addtrack2 (#10860) * Update for test * Create readme.azureresourceschema.md * Create readme.azureresourceschema.md * Update readme.chsarp.md * Update readme.typescript.md * Update readme.ruby.md * Update readme.go.md * Update readme.python.md * Update samplereadme.md * Update readme.chsarp.md * Update samplereadme.md * Update readme.chsarp.md * Update readme.python.md * Update readme.go.md * Update readme.ruby.md * Update readme.typescript.md * Update samplereadme.md * Update readme.python.md * Revert "Merge branch 'master' into patch-3" This reverts commit a9b26ac65779c2840d68a13c0a222cf5f7f44417, reversing changes made to 36bc60cd252582cc1f8de5123aed574d8f0bf3fb. * Update readme.azureresourceschema.md * Update samplereadme.md * Update readme.go.md * Update readme.go.md * Update readme.go.md * Update readme.azureresourceschema.md * Update samplereadme.md * Update samplereadme.md * Update readme.python.md * Update readme.azureresourceschema.md * Update readme.go.md * Update documentation/samplefiles/readme.go.md Co-authored-by: Arcturus * Update readme.typescript.md * Delete readme.ruby.md * Update readme.go.md * Update readme.typescript.md add /sdk/ * Rename readme.chsarp.md to readme.csharp.md * Update samplereadme.md Co-authored-by: Phoenix He Co-authored-by: Lei Ni <7233663+leni-msft@users.noreply.github.com> Co-authored-by: Arcturus --- .../samplefiles/readme.azureresourceschema.md | 11 +++---- .../{readme.chsarp.md => readme.csharp.md} | 4 +-- documentation/samplefiles/readme.go.md | 32 ++++--------------- documentation/samplefiles/readme.python.md | 25 +++++++-------- documentation/samplefiles/readme.ruby.md | 19 ----------- .../samplefiles/readme.typescript.md | 7 ++-- documentation/samplefiles/samplereadme.md | 27 +++++++--------- 7 files changed, 40 insertions(+), 85 deletions(-) rename documentation/samplefiles/{readme.chsarp.md => readme.csharp.md} (71%) delete mode 100644 documentation/samplefiles/readme.ruby.md diff --git a/documentation/samplefiles/readme.azureresourceschema.md b/documentation/samplefiles/readme.azureresourceschema.md index 819cac202170..046d4f19febb 100644 --- a/documentation/samplefiles/readme.azureresourceschema.md +++ b/documentation/samplefiles/readme.azureresourceschema.md @@ -6,19 +6,18 @@ These settings apply only when `--azureresourceschema` is specified on the comma ``` yaml $(azureresourceschema) && $(multiapi) batch: - - tag: schema-yourservicename-YYYY-MM-DD - + - tag: schema-[[ServiceName]]-[[Version]] + ``` Please also specify `--azureresourceschema-folder=`. -### Tag: schema-yourservicename-YYYY-MM-DD and azureresourceschema +### Tag: schema-[[ServiceName]]-[[Version]] and azureresourceschema -``` yaml $(tag) == 'schema-yourservicename-YYYY-MM-DD' && $(azureresourceschema) +``` yaml $(tag) == 'schema-[[ServiceName]]-[[Version]]' && $(azureresourceschema) output-folder: $(azureresourceschema-folder)/schemas # all the input files in this apiVersion input-file: - - Microsoft.YourServiceName/stable/YYYY-MM-DD/YourServiceName.json - + - [[ResourceProviderName]]/[[ReleaseState]]/[[Version]]/[[ServiceName]].json ``` diff --git a/documentation/samplefiles/readme.chsarp.md b/documentation/samplefiles/readme.csharp.md similarity index 71% rename from documentation/samplefiles/readme.chsarp.md rename to documentation/samplefiles/readme.csharp.md index 965ae218fdcb..50f5e3d43933 100644 --- a/documentation/samplefiles/readme.chsarp.md +++ b/documentation/samplefiles/readme.csharp.md @@ -10,6 +10,6 @@ csharp: payload-flattening-threshold: 1 clear-output-folder: true client-side-validation: false - namespace: Microsoft.YourServiceName - output-folder: $(csharp-sdks-folder)/YourServiceName/management/Microsoft.YourServiceName/GeneratedProtocol + namespace: [[ResourceProviderName]] + output-folder: $(csharp-sdks-folder)/[[ServiceName]]/management/[[ResourceProviderName]]/GeneratedProtocol ``` diff --git a/documentation/samplefiles/readme.go.md b/documentation/samplefiles/readme.go.md index ba38219f4d3e..8b12e08878d5 100644 --- a/documentation/samplefiles/readme.go.md +++ b/documentation/samplefiles/readme.go.md @@ -5,6 +5,7 @@ These settings apply only when `--go` is specified on the command line. ```yaml $(go) go: license-header: MICROSOFT_APACHE_NO_VERSION + namespace: [[ServiceName]] clear-output-folder: true ``` @@ -12,35 +13,14 @@ go: ``` yaml $(go) && $(multiapi) batch: - - tag: package-2019-12-01 - - tag: package-2020-07-01-preview - # add every tag listed below + - tag: package-[[Version]][[-ReleaseState]] ``` -### Tag: package-2019-12-01 and go +### Tag: package-[[Version]][[-ReleaseState]] and go -These settings apply only when `--tag=package-2019-12-01 --go` is specified on the command line. +These settings apply only when `--tag=package-[[Version]][[-ReleaseState]] --go` is specified on the command line. Please also specify `--go-sdk-folder=`. -```yaml $(tag) == 'package-2019-12-01' && $(go) -# NOTE: a stable tag must not contain any preview swagger files included -# NOTE: go namespace can only consist of lower case letters, numbers and underscores -namespace: yourservicename -# NOTE: for special cases, you can hard code the namespace in the output-folder -# NOTE: the output-folder of a stable tag must not be under the preview subdirectory -output-folder: $(go-sdk-folder)/services/$(namespace)/mgmt/2019-12-01/$(namespace) -``` - -### Tag: package-2020-07-01-preview and go - -These settings apply only when `--tag=package-2020-07-01-preview --go` is specified on the command line. -Please also specify `--go-sdk-folder=`. - -```yaml $(tag) == 'package-2020-07-01-preview' && $(go) -# NOTE: a preview tag must not contain at least one preview swagger file included -# NOTE: go namespace can only consist of lower case letters, numbers and underscores -namespace: yourservicename -# NOTE: a preview api-version must be under the preview sub-directory -# NOTE: the output-folder of a preview tag must be under the preview subdirectory -output-folder: $(go-sdk-folder)/services/preview/$(namespace)/mgmt/2020-07-01-preview/$(namespace) +```yaml $(tag) == 'package-[[Version]][[-ReleaseState]]' && $(go) +output-folder: $(go-sdk-folder)/services[[/ReleaseState]]/$(namespace)/mgmt/[[Version]]/$(namespace) ``` diff --git a/documentation/samplefiles/readme.python.md b/documentation/samplefiles/readme.python.md index f9e093c5a0ec..b2b1a23f2003 100644 --- a/documentation/samplefiles/readme.python.md +++ b/documentation/samplefiles/readme.python.md @@ -3,19 +3,18 @@ These settings apply only when `--python` is specified on the command line. Please also specify `--python-sdks-folder=`. -```yaml $(python) -python: - azure-arm: true - license-header: MICROSOFT_MIT_NO_VERSION - payload-flattening-threshold: 2 - namespace: Microsoft.YourServiceName - package-name: YourServiceName - package-version: 2019-12-01 - clear-output-folder: true +``` yaml $(python) +azure-arm: true +license-header: MICROSOFT_MIT_NO_VERSION +package-name: azure-mgmt-[[ServiceName]] +no-namespace-folders: true +package-version: 1.0.0b1 ``` -```yaml $(python) -python: - no-namespace-folders: true - output-folder: $(python-sdks-folder)/azure-mgmt/YourServiceName +``` yaml $(python-mode) == 'update' +output-folder: $(python-sdks-folder)/[[ServiceName]]/azure-mgmt-[[ServiceName]]/azure/mgmt/[[ServiceName]] +``` +``` yaml $(python-mode) == 'create' +basic-setup-py: true +output-folder: $(python-sdks-folder)/[[ServiceName]]/azure-mgmt-[[ServiceName]] ``` diff --git a/documentation/samplefiles/readme.ruby.md b/documentation/samplefiles/readme.ruby.md deleted file mode 100644 index 13f97a12c69d..000000000000 --- a/documentation/samplefiles/readme.ruby.md +++ /dev/null @@ -1,19 +0,0 @@ -## Ruby - -These settings apply only when `--ruby` is specified on the command line. - -```yaml -package-name: azure_mgmt_YourServiceName -package-version: 2019-12-01 -azure-arm: true -``` - -### Tag: package-2019-12-01 and ruby - -These settings apply only when `--tag=package-2019-12-01 --ruby` is specified on the command line. -Please also specify `--ruby-sdks-folder=`. - -```yaml $(tag) == 'package-2019-12-01' && $(ruby) -namespace: Microsoft.YourServiceName -output-folder: $(ruby-sdks-folder)/YourServiceName -``` diff --git a/documentation/samplefiles/readme.typescript.md b/documentation/samplefiles/readme.typescript.md index db7937f5e1bb..05396d5d5f70 100644 --- a/documentation/samplefiles/readme.typescript.md +++ b/documentation/samplefiles/readme.typescript.md @@ -3,11 +3,12 @@ These settings apply only when `--typescript` is specified on the command line. Please also specify `--typescript-sdks-folder=`. -```yaml $(typescript) +``` yaml $(typescript) typescript: azure-arm: true - package-name: "YourServiceName" - output-folder: "$(typescript-sdks-folder)/packages/YourServiceName" + package-name: "@azure/arm-[[ServiceName]]" + output-folder: "$(typescript-sdks-folder)/sdk/[[ServiceName]]/arm-[[ServiceName]]" payload-flattening-threshold: 1 + clear-output-folder: true generate-metadata: true ``` diff --git a/documentation/samplefiles/samplereadme.md b/documentation/samplefiles/samplereadme.md index af02111a6c18..bb885caab276 100644 --- a/documentation/samplefiles/samplereadme.md +++ b/documentation/samplefiles/samplereadme.md @@ -1,8 +1,8 @@ -# YourServiceName +# [[ServiceName]] > see https://aka.ms/autorest -This is the AutoRest configuration file for YourServiceName. +This is the AutoRest configuration file for [[ServiceName]]. ## Getting Started @@ -22,20 +22,20 @@ For other options on installation see [Installing AutoRest](https://aka.ms/autor ### Basic Information -These are the global settings for the YourServiceName. +These are the global settings for the [[ServiceName]]. ```yaml -openapi-type: arm -tag: package-YYYY-MM-DD +openapi-type: [[OpenApiType]] +tag: package-[[Version]] ``` -### Tag: package-YYYY-MM-DD +### Tag: package-[[Version]] -These settings apply only when `--tag=package-YYYY-MM-DD` is specified on the command line. +These settings apply only when `--tag=package-[[Version]]` is specified on the command line. -```yaml $(tag) == 'package-YYYY-MM-DD' +```yaml $(tag) == 'package-[[Version]]' input-file: - - Microsoft.YourServiceName/stable/YYYY-MM-DD/YourServiceName.json + - [[ResourceProviderName]]/[[ReleaseState]]/[[Version]]/[[ServiceName]].json ``` --- @@ -53,12 +53,11 @@ swagger-to-sdk: - repo: azure-sdk-for-java - repo: azure-sdk-for-go - repo: azure-sdk-for-js - - repo: azure-sdk-for-ruby after_scripts: - - bundle install && rake arm:regen_all_profiles['azure_mgmt_YourServiceName'] + - bundle install && rake arm:regen_all_profiles['azure_mgmt_[[ServiceName]]'] - repo: azure-resource-manager-schemas after_scripts: - - node sdkauto_afterscript.js yourservicename/resource-manager + - node sdkauto_afterscript.js [[ServiceName]]/resource-manager ``` ## Go @@ -69,10 +68,6 @@ See configuration in [readme.go.md](https://github.com/Azure/azure-rest-api-spec See configuration in [readme.python.md](https://github.com/Azure/azure-rest-api-specs/blob/master/documentation/samplefiles/readme.python.md) -## Ruby - -See configuration in [readme.ruby.md](https://github.com/Azure/azure-rest-api-specs/blob/master/documentation/samplefiles/readme.ruby.md) - ## TypeScript See configuration in [readme.typescript.md](https://github.com/Azure/azure-rest-api-specs/blob/master/documentation/samplefiles/readme.typescript.md)