From 3ef00fccb1ffe2f30ae2aa0ff882414c6e31d7c4 Mon Sep 17 00:00:00 2001 From: 00Kai0 Date: Mon, 9 Nov 2020 16:14:41 +0800 Subject: [PATCH 1/2] add iothub track2 config --- .../iothub/resource-manager/readme.python.md | 89 ++++++++++++++++--- 1 file changed, 79 insertions(+), 10 deletions(-) diff --git a/specification/iothub/resource-manager/readme.python.md b/specification/iothub/resource-manager/readme.python.md index c46cafabce12..28d0d3a37795 100644 --- a/specification/iothub/resource-manager/readme.python.md +++ b/specification/iothub/resource-manager/readme.python.md @@ -4,7 +4,7 @@ These settings apply only when `--python` is specified on the command line. Please also specify `--python-sdks-folder=`. Use `--python-mode=update` if you already have a setup.py and just want to update the code itself. -``` yaml $(python) +``` yaml $(python) && !$(track2) python: azure-arm: true license-header: MICROSOFT_MIT_NO_VERSION @@ -16,11 +16,33 @@ python: no-namespace-folders: true ``` +``` yaml $(python) && $(track2) +azure-arm: true +license-header: MICROSOFT_MIT_NO_VERSION +namespace: azure.mgmt.iothub +package-name: azure-mgmt-iothub +package-version: 1.0.0b1 +clear-output-folder: true +no-namespace-folders: true +``` + ### Python multi-api Generate all API versions currently shipped for this package -```yaml $(python) && $(multiapi) +```yaml $(python) && $(multiapi) && !$(track2) +batch: + - tag: package-2020-03 + - tag: package-2019-11 + - tag: package-2019-03 + - tag: package-2018-04 + - tag: package-2018-01 + - tag: package-2017-07 + - tag: package-2017-01 + - tag: package-2016-02 +``` + +```yaml $(python) && $(multiapi) && $(track2) batch: - tag: package-2020-03 - tag: package-2019-11 @@ -30,6 +52,13 @@ batch: - tag: package-2017-07 - tag: package-2017-01 - tag: package-2016-02 + - multiapisceipt: true +``` + +``` yaml $(multiapiscript) +output-folder: $(python-sdks-folder)/iothub/azure-mgmt-iothub/azure/mgmt/iothub/ +clear-output-folder: false +perform-load: false ``` ### Tag: package-2020-03 and python @@ -37,85 +66,125 @@ batch: These settings apply only when `--tag=package-2020-03 --python` is specified on the command line. Please also specify `--python-sdks-folder=`. -``` yaml $(tag) == 'package-2020-03' && $(python) +``` yaml $(tag) == 'package-2020-03' && $(python) && !$(track2) python: namespace: azure.mgmt.iothub.v2020_03_01 output-folder: $(python-sdks-folder)/iothub/azure-mgmt-iothub/azure/mgmt/iothub/v2020_03_01 ``` +``` yaml $(tag) == 'package-2020-03' && $(python) && $(track2) +namespace: azure.mgmt.iothub.v2020_03_01 +output-folder: $(python-sdks-folder)/iothub/azure-mgmt-iothub/azure/mgmt/iothub/v2020_03_01 +``` + ### Tag: package-2019-11 and python These settings apply only when `--tag=package-2019-11 --python` is specified on the command line. Please also specify `--python-sdks-folder=`. -``` yaml $(tag) == 'package-2019-11' && $(python) +``` yaml $(tag) == 'package-2019-11' && $(python) && !$(track2) python: namespace: azure.mgmt.iothub.v2019_11_04 output-folder: $(python-sdks-folder)/iothub/azure-mgmt-iothub/azure/mgmt/iothub/v2019_11_04 ``` +``` yaml $(tag) == 'package-2019-11' && $(python) && $(track2) +namespace: azure.mgmt.iothub.v2019_11_04 +output-folder: $(python-sdks-folder)/iothub/azure-mgmt-iothub/azure/mgmt/iothub/v2019_11_04 +``` + ### Tag: package-2019-03 and python These settings apply only when `--tag=package-2019-03 --python` is specified on the command line. Please also specify `--python-sdks-folder=`. -``` yaml $(tag) == 'package-2019-03' && $(python) +``` yaml $(tag) == 'package-2019-03' && $(python) && !$(track2) python: namespace: azure.mgmt.iothub.v2019_03_22 output-folder: $(python-sdks-folder)/iothub/azure-mgmt-iothub/azure/mgmt/iothub/v2019_03_22 ``` +``` yaml $(tag) == 'package-2019-03' && $(python) && $(track2) +namespace: azure.mgmt.iothub.v2019_03_22 +output-folder: $(python-sdks-folder)/iothub/azure-mgmt-iothub/azure/mgmt/iothub/v2019_03_22 +``` + ### Tag: package-2018-04 and python These settings apply only when `--tag=package-2018-04 --python` is specified on the command line. Please also specify `--python-sdks-folder=`. -``` yaml $(tag) == 'package-2018-04' && $(python) +``` yaml $(tag) == 'package-2018-04' && $(python) && !$(track2) python: namespace: azure.mgmt.iothub.v2018_04_01 output-folder: $(python-sdks-folder)/iothub/azure-mgmt-iothub/azure/mgmt/iothub/v2018_04_01 ``` +``` yaml $(tag) == 'package-2018-04' && $(python) && $(track2) +namespace: azure.mgmt.iothub.v2018_04_01 +output-folder: $(python-sdks-folder)/iothub/azure-mgmt-iothub/azure/mgmt/iothub/v2018_04_01 +``` + ### Tag: package-2018-01 and python These settings apply only when `--tag=package-2018-01 --python` is specified on the command line. Please also specify `--python-sdks-folder=`. -``` yaml $(tag) == 'package-2018-01' && $(python) +``` yaml $(tag) == 'package-2018-01' && $(python) && !$(track2) python: namespace: azure.mgmt.iothub.v2018_01_22 output-folder: $(python-sdks-folder)/iothub/azure-mgmt-iothub/azure/mgmt/iothub/v2018_01_22 ``` +``` yaml $(tag) == 'package-2018-01' && $(python) && $(track2) +namespace: azure.mgmt.iothub.v2018_01_22 +output-folder: $(python-sdks-folder)/iothub/azure-mgmt-iothub/azure/mgmt/iothub/v2018_01_22 +``` + ### Tag: package-2017-07 and python These settings apply only when `--tag=package-2017-07 --python` is specified on the command line. Please also specify `--python-sdks-folder=`. -``` yaml $(tag) == 'package-2017-07' && $(python) +``` yaml $(tag) == 'package-2017-07' && $(python) && !$(track2) python: namespace: azure.mgmt.iothub.v2017_07_01 output-folder: $(python-sdks-folder)/iothub/azure-mgmt-iothub/azure/mgmt/iothub/v2017_07_01 ``` +``` yaml $(tag) == 'package-2017-07' && $(python) && $(track2) +namespace: azure.mgmt.iothub.v2017_07_01 +output-folder: $(python-sdks-folder)/iothub/azure-mgmt-iothub/azure/mgmt/iothub/v2017_07_01 +``` + ### Tag: package-2017-01 and python These settings apply only when `--tag=package-2017-01 --python` is specified on the command line. Please also specify `--python-sdks-folder=`. -``` yaml $(tag) == 'package-2017-01' && $(python) +``` yaml $(tag) == 'package-2017-01' && $(python) && !$(track2) python: namespace: azure.mgmt.iothub.v2017_01_19 output-folder: $(python-sdks-folder)/iothub/azure-mgmt-iothub/azure/mgmt/iothub/v2017_01_19 ``` +``` yaml $(tag) == 'package-2017-01' && $(python) && $(track2) +namespace: azure.mgmt.iothub.v2017_01_19 +output-folder: $(python-sdks-folder)/iothub/azure-mgmt-iothub/azure/mgmt/iothub/v2017_01_19 +``` + ### Tag: package-2016-02 and python These settings apply only when `--tag=package-2016-02 --python` is specified on the command line. Please also specify `--python-sdks-folder=`. -``` yaml $(tag) == 'package-2016-02' && $(python) +``` yaml $(tag) == 'package-2016-02' && $(python) && !$(track2) python: namespace: azure.mgmt.iothub.v2016_02_03 output-folder: $(python-sdks-folder)/iothub/azure-mgmt-iothub/azure/mgmt/iothub/v2016_02_03 ``` + +``` yaml $(tag) == 'package-2016-02' && $(python) && $(track2) +namespace: azure.mgmt.iothub.v2016_02_03 +output-folder: $(python-sdks-folder)/iothub/azure-mgmt-iothub/azure/mgmt/iothub/v2016_02_03 +``` From 1ef8c320c763c29348b3641f11868ed4b05fd0e1 Mon Sep 17 00:00:00 2001 From: 00Kai0 Date: Fri, 13 Nov 2020 10:55:38 +0800 Subject: [PATCH 2/2] add iothub track2 config and fix error response error. --- .../Microsoft.Devices/preview/2018-12-01-preview/iothub.json | 3 ++- .../Microsoft.Devices/preview/2019-03-22-preview/iothub.json | 3 ++- .../Microsoft.Devices/preview/2019-07-01-preview/iothub.json | 3 ++- .../Microsoft.Devices/preview/2020-07-10-preview/iothub.json | 3 ++- .../Microsoft.Devices/stable/2016-02-03/iothub.json | 3 ++- .../Microsoft.Devices/stable/2017-01-19/iothub.json | 3 ++- .../Microsoft.Devices/stable/2017-07-01/iothub.json | 3 ++- .../Microsoft.Devices/stable/2018-01-22/iothub.json | 3 ++- .../Microsoft.Devices/stable/2018-04-01/iothub.json | 3 ++- .../Microsoft.Devices/stable/2019-03-22/iothub.json | 3 ++- .../Microsoft.Devices/stable/2019-11-04/iothub.json | 3 ++- .../Microsoft.Devices/stable/2020-03-01/iothub.json | 3 ++- .../Microsoft.Devices/stable/2020-04-01/iothub.json | 3 ++- .../Microsoft.Devices/stable/2020-06-15/iothub.json | 3 ++- .../Microsoft.Devices/stable/2020-08-01/iothub.json | 3 ++- specification/iothub/resource-manager/readme.python.md | 4 ++-- 16 files changed, 32 insertions(+), 17 deletions(-) diff --git a/specification/iothub/resource-manager/Microsoft.Devices/preview/2018-12-01-preview/iothub.json b/specification/iothub/resource-manager/Microsoft.Devices/preview/2018-12-01-preview/iothub.json index 97d6f6c8e5b5..1923788a44b2 100644 --- a/specification/iothub/resource-manager/Microsoft.Devices/preview/2018-12-01-preview/iothub.json +++ b/specification/iothub/resource-manager/Microsoft.Devices/preview/2018-12-01-preview/iothub.json @@ -287,7 +287,8 @@ "description": "After the long running delete operation completes successfully, a 404 Not Found is returned when the status polling request no longer finds the Iot hub metadata in the service.", "schema": { "$ref": "#/definitions/ErrorDetails" - } + }, + "x-ms-error-response": true }, "default": { "description": "DefaultErrorResponse", diff --git a/specification/iothub/resource-manager/Microsoft.Devices/preview/2019-03-22-preview/iothub.json b/specification/iothub/resource-manager/Microsoft.Devices/preview/2019-03-22-preview/iothub.json index 121d86871358..ab3cfdfb6677 100644 --- a/specification/iothub/resource-manager/Microsoft.Devices/preview/2019-03-22-preview/iothub.json +++ b/specification/iothub/resource-manager/Microsoft.Devices/preview/2019-03-22-preview/iothub.json @@ -287,7 +287,8 @@ "description": "After the long running delete operation completes successfully, a 404 Not Found is returned when the status polling request no longer finds the Iot hub metadata in the service.", "schema": { "$ref": "#/definitions/ErrorDetails" - } + }, + "x-ms-error-response": true }, "default": { "description": "DefaultErrorResponse", diff --git a/specification/iothub/resource-manager/Microsoft.Devices/preview/2019-07-01-preview/iothub.json b/specification/iothub/resource-manager/Microsoft.Devices/preview/2019-07-01-preview/iothub.json index 001208137980..d2ebf23f20d8 100644 --- a/specification/iothub/resource-manager/Microsoft.Devices/preview/2019-07-01-preview/iothub.json +++ b/specification/iothub/resource-manager/Microsoft.Devices/preview/2019-07-01-preview/iothub.json @@ -287,7 +287,8 @@ "description": "After the long running delete operation completes successfully, a 404 Not Found is returned when the status polling request no longer finds the Iot hub metadata in the service.", "schema": { "$ref": "#/definitions/ErrorDetails" - } + }, + "x-ms-error-response": true }, "default": { "description": "DefaultErrorResponse", diff --git a/specification/iothub/resource-manager/Microsoft.Devices/preview/2020-07-10-preview/iothub.json b/specification/iothub/resource-manager/Microsoft.Devices/preview/2020-07-10-preview/iothub.json index 59d9bcb1c64e..388d5705d4d0 100644 --- a/specification/iothub/resource-manager/Microsoft.Devices/preview/2020-07-10-preview/iothub.json +++ b/specification/iothub/resource-manager/Microsoft.Devices/preview/2020-07-10-preview/iothub.json @@ -287,7 +287,8 @@ "description": "After the long running delete operation completes successfully, a 404 Not Found is returned when the status polling request no longer finds the Iot hub metadata in the service.", "schema": { "$ref": "#/definitions/ErrorDetails" - } + }, + "x-ms-error-response": true }, "default": { "description": "DefaultErrorResponse", diff --git a/specification/iothub/resource-manager/Microsoft.Devices/stable/2016-02-03/iothub.json b/specification/iothub/resource-manager/Microsoft.Devices/stable/2016-02-03/iothub.json index 564af4ae1aa4..6b92325d07ff 100644 --- a/specification/iothub/resource-manager/Microsoft.Devices/stable/2016-02-03/iothub.json +++ b/specification/iothub/resource-manager/Microsoft.Devices/stable/2016-02-03/iothub.json @@ -185,7 +185,8 @@ "description": "After the long running delete operation completes successfully, a 404 Not Found is returned when the status polling request no longer finds the Iot hub metadata in the service.", "schema": { "$ref": "#/definitions/ErrorDetails" - } + }, + "x-ms-error-response": true }, "default": { "description": "DefaultErrorResponse", diff --git a/specification/iothub/resource-manager/Microsoft.Devices/stable/2017-01-19/iothub.json b/specification/iothub/resource-manager/Microsoft.Devices/stable/2017-01-19/iothub.json index 4124e38061e3..e5400c8299ce 100644 --- a/specification/iothub/resource-manager/Microsoft.Devices/stable/2017-01-19/iothub.json +++ b/specification/iothub/resource-manager/Microsoft.Devices/stable/2017-01-19/iothub.json @@ -176,7 +176,8 @@ "description": "After the long running delete operation completes successfully, a 404 Not Found is returned when the status polling request no longer finds the Iot hub metadata in the service.", "schema": { "$ref": "#/definitions/ErrorDetails" - } + }, + "x-ms-error-response": true }, "default": { "description": "DefaultErrorResponse", diff --git a/specification/iothub/resource-manager/Microsoft.Devices/stable/2017-07-01/iothub.json b/specification/iothub/resource-manager/Microsoft.Devices/stable/2017-07-01/iothub.json index 91f9c4a2fafa..13bada3b0fb3 100644 --- a/specification/iothub/resource-manager/Microsoft.Devices/stable/2017-07-01/iothub.json +++ b/specification/iothub/resource-manager/Microsoft.Devices/stable/2017-07-01/iothub.json @@ -208,7 +208,8 @@ "description": "After the long running delete operation completes successfully, a 404 Not Found is returned when the status polling request no longer finds the Iot hub metadata in the service.", "schema": { "$ref": "#/definitions/ErrorDetails" - } + }, + "x-ms-error-response": true }, "default": { "description": "DefaultErrorResponse", diff --git a/specification/iothub/resource-manager/Microsoft.Devices/stable/2018-01-22/iothub.json b/specification/iothub/resource-manager/Microsoft.Devices/stable/2018-01-22/iothub.json index 8afc7396d4f3..414c43fea7f1 100644 --- a/specification/iothub/resource-manager/Microsoft.Devices/stable/2018-01-22/iothub.json +++ b/specification/iothub/resource-manager/Microsoft.Devices/stable/2018-01-22/iothub.json @@ -287,7 +287,8 @@ "description": "After the long running delete operation completes successfully, a 404 Not Found is returned when the status polling request no longer finds the Iot hub metadata in the service.", "schema": { "$ref": "#/definitions/ErrorDetails" - } + }, + "x-ms-error-response": true }, "default": { "description": "DefaultErrorResponse", diff --git a/specification/iothub/resource-manager/Microsoft.Devices/stable/2018-04-01/iothub.json b/specification/iothub/resource-manager/Microsoft.Devices/stable/2018-04-01/iothub.json index e1dfe539ef66..030d9bcd2ab2 100644 --- a/specification/iothub/resource-manager/Microsoft.Devices/stable/2018-04-01/iothub.json +++ b/specification/iothub/resource-manager/Microsoft.Devices/stable/2018-04-01/iothub.json @@ -287,7 +287,8 @@ "description": "After the long running delete operation completes successfully, a 404 Not Found is returned when the status polling request no longer finds the Iot hub metadata in the service.", "schema": { "$ref": "#/definitions/ErrorDetails" - } + }, + "x-ms-error-response": true }, "default": { "description": "DefaultErrorResponse", diff --git a/specification/iothub/resource-manager/Microsoft.Devices/stable/2019-03-22/iothub.json b/specification/iothub/resource-manager/Microsoft.Devices/stable/2019-03-22/iothub.json index 191d7c9f3bca..3a20ad42efe6 100644 --- a/specification/iothub/resource-manager/Microsoft.Devices/stable/2019-03-22/iothub.json +++ b/specification/iothub/resource-manager/Microsoft.Devices/stable/2019-03-22/iothub.json @@ -287,7 +287,8 @@ "description": "After the long running delete operation completes successfully, a 404 Not Found is returned when the status polling request no longer finds the Iot hub metadata in the service.", "schema": { "$ref": "#/definitions/ErrorDetails" - } + }, + "x-ms-error-response": true }, "default": { "description": "DefaultErrorResponse", diff --git a/specification/iothub/resource-manager/Microsoft.Devices/stable/2019-11-04/iothub.json b/specification/iothub/resource-manager/Microsoft.Devices/stable/2019-11-04/iothub.json index 9010c5d2ae30..371348c29437 100644 --- a/specification/iothub/resource-manager/Microsoft.Devices/stable/2019-11-04/iothub.json +++ b/specification/iothub/resource-manager/Microsoft.Devices/stable/2019-11-04/iothub.json @@ -287,7 +287,8 @@ "description": "After the long running delete operation completes successfully, a 404 Not Found is returned when the status polling request no longer finds the Iot hub metadata in the service.", "schema": { "$ref": "#/definitions/ErrorDetails" - } + }, + "x-ms-error-response": true }, "default": { "description": "DefaultErrorResponse", diff --git a/specification/iothub/resource-manager/Microsoft.Devices/stable/2020-03-01/iothub.json b/specification/iothub/resource-manager/Microsoft.Devices/stable/2020-03-01/iothub.json index 8452cf2c92db..cf3fb4402987 100644 --- a/specification/iothub/resource-manager/Microsoft.Devices/stable/2020-03-01/iothub.json +++ b/specification/iothub/resource-manager/Microsoft.Devices/stable/2020-03-01/iothub.json @@ -287,7 +287,8 @@ "description": "After the long running delete operation completes successfully, a 404 Not Found is returned when the status polling request no longer finds the Iot hub metadata in the service.", "schema": { "$ref": "#/definitions/ErrorDetails" - } + }, + "x-ms-error-response": true }, "default": { "description": "DefaultErrorResponse", diff --git a/specification/iothub/resource-manager/Microsoft.Devices/stable/2020-04-01/iothub.json b/specification/iothub/resource-manager/Microsoft.Devices/stable/2020-04-01/iothub.json index 044be4a4acf5..c65268ba4fd8 100644 --- a/specification/iothub/resource-manager/Microsoft.Devices/stable/2020-04-01/iothub.json +++ b/specification/iothub/resource-manager/Microsoft.Devices/stable/2020-04-01/iothub.json @@ -287,7 +287,8 @@ "description": "After the long running delete operation completes successfully, a 404 Not Found is returned when the status polling request no longer finds the Iot hub metadata in the service.", "schema": { "$ref": "#/definitions/ErrorDetails" - } + }, + "x-ms-error-response": true }, "default": { "description": "DefaultErrorResponse", diff --git a/specification/iothub/resource-manager/Microsoft.Devices/stable/2020-06-15/iothub.json b/specification/iothub/resource-manager/Microsoft.Devices/stable/2020-06-15/iothub.json index 634aea7c600b..93102035480d 100644 --- a/specification/iothub/resource-manager/Microsoft.Devices/stable/2020-06-15/iothub.json +++ b/specification/iothub/resource-manager/Microsoft.Devices/stable/2020-06-15/iothub.json @@ -287,7 +287,8 @@ "description": "After the long running delete operation completes successfully, a 404 Not Found is returned when the status polling request no longer finds the Iot hub metadata in the service.", "schema": { "$ref": "#/definitions/ErrorDetails" - } + }, + "x-ms-error-response": true }, "default": { "description": "DefaultErrorResponse", diff --git a/specification/iothub/resource-manager/Microsoft.Devices/stable/2020-08-01/iothub.json b/specification/iothub/resource-manager/Microsoft.Devices/stable/2020-08-01/iothub.json index 1a69c060f0f6..2cba11e96b57 100644 --- a/specification/iothub/resource-manager/Microsoft.Devices/stable/2020-08-01/iothub.json +++ b/specification/iothub/resource-manager/Microsoft.Devices/stable/2020-08-01/iothub.json @@ -287,7 +287,8 @@ "description": "After the long running delete operation completes successfully, a 404 Not Found is returned when the status polling request no longer finds the Iot hub metadata in the service.", "schema": { "$ref": "#/definitions/ErrorDetails" - } + }, + "x-ms-error-response": true }, "default": { "description": "DefaultErrorResponse", diff --git a/specification/iothub/resource-manager/readme.python.md b/specification/iothub/resource-manager/readme.python.md index 28d0d3a37795..36f03774479c 100644 --- a/specification/iothub/resource-manager/readme.python.md +++ b/specification/iothub/resource-manager/readme.python.md @@ -22,7 +22,6 @@ license-header: MICROSOFT_MIT_NO_VERSION namespace: azure.mgmt.iothub package-name: azure-mgmt-iothub package-version: 1.0.0b1 -clear-output-folder: true no-namespace-folders: true ``` @@ -43,6 +42,7 @@ batch: ``` ```yaml $(python) && $(multiapi) && $(track2) +clear-output-folder: true batch: - tag: package-2020-03 - tag: package-2019-11 @@ -52,7 +52,7 @@ batch: - tag: package-2017-07 - tag: package-2017-01 - tag: package-2016-02 - - multiapisceipt: true + - multiapiscript: true ``` ``` yaml $(multiapiscript)