From da01d4c32a22fc3e0f5aa9b80e9368120f685f92 Mon Sep 17 00:00:00 2001 From: Phoenix He Date: Tue, 12 Nov 2019 12:56:35 +0800 Subject: [PATCH 01/10] Update for test --- .azure-pipelines/SDKAutomation.yml | 7 +++-- specificationRepositoryConfiguration.json | 38 +++++++++-------------- 2 files changed, 20 insertions(+), 25 deletions(-) diff --git a/.azure-pipelines/SDKAutomation.yml b/.azure-pipelines/SDKAutomation.yml index cccf557fcad8..51e9e99229f5 100644 --- a/.azure-pipelines/SDKAutomation.yml +++ b/.azure-pipelines/SDKAutomation.yml @@ -13,9 +13,12 @@ variables: jobs: - job: "SDKAutomation" - displayName: SDK + displayName: SDK Automation pool: - vmImage: 'Ubuntu 18.04' + vmImage: 'Ubuntu 16.04' + container: + image: sdkautomation.azurecr.io/openapi-sdk-automation:ppe + endpoint: sdkautomationv2-registry timeoutInMinutes: 180 variables: diff --git a/specificationRepositoryConfiguration.json b/specificationRepositoryConfiguration.json index 31141d585fbe..39fb090d9d71 100644 --- a/specificationRepositoryConfiguration.json +++ b/specificationRepositoryConfiguration.json @@ -3,25 +3,27 @@ "pipelineName": "automation - sdk", "sdkRepositoryMappings": { "azure-sdk-for-go": { - "integrationRepository": "AzureSDKAutomation/azure-sdk-for-go", - "mainRepository": "Azure/azure-sdk-for-go" + "integrationBranchPrefix": "sdkAutomationPPE", + "generationRepository": "test-repo-tih/azure-sdk-for-go", + "integrationRepository": "test-repo-tih/azure-sdk-for-go", + "mainRepository": "test-repo-arcturus/azure-sdk-for-go" }, "azure-sdk-for-java": { - "integrationRepository": "AzureSDKAutomation/azure-sdk-for-java", - "mainRepository": "Azure/azure-sdk-for-java" + "generationRepository": "test-repo-billy/azure-sdk-for-java", + "mainRepository": "test-repo-billy/azure-sdk-for-java" }, "azure-sdk-for-js": { - "integrationRepository": "AzureSDKAutomation/azure-sdk-for-js", - "mainRepository": "Azure/azure-sdk-for-js" + "generationRepository": "test-repo-billy/azure-sdk-for-js", + "mainRepository": "test-repo-billy/azure-sdk-for-js" }, "azure-sdk-for-net": { - "integrationRepository": "AzureSDKAutomation/azure-sdk-for-net", - "mainRepository": "Azure/azure-sdk-for-net" + "generationRepository": "test-repo-billy/azure-sdk-for-net", + "mainRepository": "test-repo-billy/azure-sdk-for-net" }, "azure-sdk-for-python": { - "integrationRepository": "AzureSDKAutomation/azure-sdk-for-python", - "mainRepository": "Azure/azure-sdk-for-python", - "mainBranch": "release/v3" + "generationRepository": "test-repo-billy/azure-sdk-for-python", + "integrationRepository": "test-repo-billy/azure-sdk-for-python", + "mainRepository": "test-repo-billy/azure-sdk-for-python" }, "azure-sdk-for-python-track2": { "integrationRepository": "AzureSDKAutomation/azure-sdk-for-python", @@ -33,18 +35,8 @@ }, "azure-sdk-for-ruby": { "mainBranch": "latest", - "integrationRepository": "AzureSDKAutomation/azure-sdk-for-ruby", - "mainRepository": "Azure/azure-sdk-for-ruby" - }, - "azure-sdk-for-trenton": { - "integrationRepository": "Azure/azure-sdk-for-trenton", - "mainRepository": "Azure/azure-sdk-for-trenton", - "secondaryRepository": "Azure/azure-sdk-for-trenton", - "secondaryBranch": "secondary" - }, - "azure-resource-manager-schemas": { - "integrationRepository": "AzureSDKAutomation/azure-resource-manager-schemas", - "mainRepository": "Azure/azure-resource-manager-schemas" + "generationRepository": "test-repo-billy/azure-sdk-for-ruby", + "mainRepository": "test-repo-billy/azure-sdk-for-ruby" } } } From affb5f16a9ca65f015f8fdb768d85f1913d18853 Mon Sep 17 00:00:00 2001 From: Tianen <347142915@qq.com> Date: Mon, 21 Sep 2020 16:43:14 +0800 Subject: [PATCH 02/10] Create readme.azureresourceschema.md --- .../samplefiles/readme.azureresourceschema.md | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 documentation/samplefiles/readme.azureresourceschema.md diff --git a/documentation/samplefiles/readme.azureresourceschema.md b/documentation/samplefiles/readme.azureresourceschema.md new file mode 100644 index 000000000000..e550c54ee38f --- /dev/null +++ b/documentation/samplefiles/readme.azureresourceschema.md @@ -0,0 +1,23 @@ +## AzureResourceSchema + +These settings apply only when `--azureresourceschema` is specified on the command line. + +### AzureResourceSchema multi-api + +```yaml +batch: + - tag: schema-[[ServiceName]]-[[Version]] +``` + + +### Tag: schema-[[Version]] and azureresourceschema + +Please also specify `--azureresourceschema-folder=`. + +```yaml + output-folder: $(azureresourceschema-folder)/schemas + + # all the input files in this apiVersion + input-file: + - [[ResourceProviderName]]/[[ReleaseState]]/[[Version]]/[[ServiceName]].json +``` From cf061bbf078a2aaf2e2f765d5691692a9392c32a Mon Sep 17 00:00:00 2001 From: Tianen <347142915@qq.com> Date: Mon, 21 Sep 2020 16:44:30 +0800 Subject: [PATCH 03/10] Update readme.chsarp.md --- documentation/samplefiles/readme.chsarp.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/documentation/samplefiles/readme.chsarp.md b/documentation/samplefiles/readme.chsarp.md index 965ae218fdcb..5e0a9c182594 100644 --- a/documentation/samplefiles/readme.chsarp.md +++ b/documentation/samplefiles/readme.chsarp.md @@ -1,4 +1,4 @@ -## C# +## C These settings apply only when `--csharp` is specified on the command line. Please also specify `--csharp-sdks-folder=`. @@ -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 ``` From e86efe87096c586eab3ab5f2b65a890205b94798 Mon Sep 17 00:00:00 2001 From: Tianen <347142915@qq.com> Date: Mon, 21 Sep 2020 16:45:18 +0800 Subject: [PATCH 04/10] Update readme.typescript.md --- documentation/samplefiles/readme.typescript.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/documentation/samplefiles/readme.typescript.md b/documentation/samplefiles/readme.typescript.md index db7937f5e1bb..0863226f334a 100644 --- a/documentation/samplefiles/readme.typescript.md +++ b/documentation/samplefiles/readme.typescript.md @@ -6,8 +6,8 @@ Please also specify `--typescript-sdks-folder= Date: Mon, 21 Sep 2020 16:46:04 +0800 Subject: [PATCH 05/10] Update readme.ruby.md --- documentation/samplefiles/readme.ruby.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/documentation/samplefiles/readme.ruby.md b/documentation/samplefiles/readme.ruby.md index 13f97a12c69d..b377151aff5e 100644 --- a/documentation/samplefiles/readme.ruby.md +++ b/documentation/samplefiles/readme.ruby.md @@ -3,17 +3,17 @@ These settings apply only when `--ruby` is specified on the command line. ```yaml -package-name: azure_mgmt_YourServiceName -package-version: 2019-12-01 +package-name: azure_mgmt_[[ServiceName]] +package-version: [[Version]] azure-arm: true ``` -### Tag: package-2019-12-01 and ruby +### Tag: package-[[Version]] and ruby -These settings apply only when `--tag=package-2019-12-01 --ruby` is specified on the command line. +These settings apply only when `--tag=package-[[Version]] --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 +```yaml $(tag) == 'package-[[Version]]' && $(ruby) +namespace: [[ResourceProviderName]] +output-folder: $(ruby-sdks-folder)/[[ServiceName]] ``` From 0f8950e52ca103075b8f81e92b67c3f504295bf1 Mon Sep 17 00:00:00 2001 From: Tianen <347142915@qq.com> Date: Mon, 21 Sep 2020 16:46:40 +0800 Subject: [PATCH 06/10] Update readme.go.md --- documentation/samplefiles/readme.go.md | 39 ++++---------------------- 1 file changed, 6 insertions(+), 33 deletions(-) diff --git a/documentation/samplefiles/readme.go.md b/documentation/samplefiles/readme.go.md index ba38219f4d3e..b5c639c5d82c 100644 --- a/documentation/samplefiles/readme.go.md +++ b/documentation/samplefiles/readme.go.md @@ -8,39 +8,12 @@ go: clear-output-folder: true ``` -### Go multi-api +### Tag: package-[[Version]] and go -``` yaml $(go) && $(multiapi) -batch: - - tag: package-2019-12-01 - - tag: package-2020-07-01-preview - # add every tag listed below -``` - -### Tag: package-2019-12-01 and go - -These settings apply only when `--tag=package-2019-12-01 --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=`. +These settings apply only when `--tag=package-[[Version]] --go` is specified on the command line. +Please also specify `--go-sdks-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]]' && $(go) +namespace: [[ResourceProviderName]] +output-folder: $(go-sdks-folder)/[[ServiceName]]/Generated ``` From 4398fa0eb27136d6f558762f6d9b7cdb31fb1a24 Mon Sep 17 00:00:00 2001 From: Tianen <347142915@qq.com> Date: Mon, 21 Sep 2020 16:47:01 +0800 Subject: [PATCH 07/10] Update readme.python.md --- documentation/samplefiles/readme.python.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/documentation/samplefiles/readme.python.md b/documentation/samplefiles/readme.python.md index f9e093c5a0ec..a7897d6a9011 100644 --- a/documentation/samplefiles/readme.python.md +++ b/documentation/samplefiles/readme.python.md @@ -8,14 +8,14 @@ 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 + namespace: [[ResourceProviderName]] + package-name: [[ServiceName]] + package-version: [[Version]] clear-output-folder: true ``` ```yaml $(python) python: no-namespace-folders: true - output-folder: $(python-sdks-folder)/azure-mgmt/YourServiceName + output-folder: $(python-sdks-folder)/azure-mgmt/[[ServiceName]] ``` From 4f0c4ad25d0d49e76d79e1cc811185fab1517ff5 Mon Sep 17 00:00:00 2001 From: Tianen <347142915@qq.com> Date: Mon, 21 Sep 2020 16:47:28 +0800 Subject: [PATCH 08/10] Update samplereadme.md --- documentation/samplefiles/samplereadme.md | 30 +++++++++++------------ 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/documentation/samplefiles/samplereadme.md b/documentation/samplefiles/samplereadme.md index f76fab965fc8..28101e3177bb 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 ``` --- @@ -55,25 +55,25 @@ swagger-to-sdk: - 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]]'] ``` ## Go -See configuration in [readme.go.md](https://github.com/Azure/azure-rest-api-specs/blob/master/documentation/samplefiles/readme.go.md) +See configuration in [readme.go.md](./readme.go.md) ## Python -See configuration in [readme.python.md](https://github.com/Azure/azure-rest-api-specs/blob/master/documentation/samplefiles/readme.python.md) +See configuration in [readme.python.md](./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) +See configuration in [readme.ruby.md](./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) +See configuration in [readme.typescript.md](./readme.typescript.md) ## CSharp -See configuration in [readme.csharp.md](https://github.com/Azure/azure-rest-api-specs/blob/master/documentation/samplefiles/readme.chsarp.md) +See configuration in [readme.csharp.md](./readme.csharp.md) From 509cbc5b53a871f2afcd342c422f46a9c4006677 Mon Sep 17 00:00:00 2001 From: Tianen <347142915@qq.com> Date: Mon, 21 Sep 2020 16:57:56 +0800 Subject: [PATCH 09/10] Update readme.chsarp.md --- documentation/samplefiles/readme.chsarp.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/documentation/samplefiles/readme.chsarp.md b/documentation/samplefiles/readme.chsarp.md index 5e0a9c182594..50f5e3d43933 100644 --- a/documentation/samplefiles/readme.chsarp.md +++ b/documentation/samplefiles/readme.chsarp.md @@ -1,4 +1,4 @@ -## C +## C# These settings apply only when `--csharp` is specified on the command line. Please also specify `--csharp-sdks-folder=`. From 169db53bbf37cda5ad5d77e8eb1b56cbf6782de8 Mon Sep 17 00:00:00 2001 From: Tianen <347142915@qq.com> Date: Mon, 21 Sep 2020 17:00:29 +0800 Subject: [PATCH 10/10] Update samplereadme.md --- documentation/samplefiles/samplereadme.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/documentation/samplefiles/samplereadme.md b/documentation/samplefiles/samplereadme.md index 28101e3177bb..fb416d60d4e6 100644 --- a/documentation/samplefiles/samplereadme.md +++ b/documentation/samplefiles/samplereadme.md @@ -60,20 +60,20 @@ swagger-to-sdk: ## Go -See configuration in [readme.go.md](./readme.go.md) +See configuration in [readme.go.md](https://github.com/Azure/azure-rest-api-specs/blob/master/documentation/samplefiles/readme.go.md) ## Python -See configuration in [readme.python.md](./readme.python.md) +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](./readme.ruby.md) +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](./readme.typescript.md) +See configuration in [readme.typescript.md](https://github.com/Azure/azure-rest-api-specs/blob/master/documentation/samplefiles/readme.typescript.md) ## CSharp -See configuration in [readme.csharp.md](./readme.csharp.md) +See configuration in [readme.csharp.md](https://github.com/Azure/azure-rest-api-specs/blob/master/documentation/samplefiles/readme.chsarp.md)