From e03bfc8e8e3bd0bb072f04cfe49b4edef50bd13e Mon Sep 17 00:00:00 2001 From: Zed <601306339@qq.com> Date: Wed, 12 May 2021 10:51:56 +0800 Subject: [PATCH 01/11] sql t2 readme config --- specification/sql/resource-manager/readme.md | 29 +---------- .../sql/resource-manager/readme.python.md | 49 +++++++++++++++++++ 2 files changed, 51 insertions(+), 27 deletions(-) create mode 100644 specification/sql/resource-manager/readme.python.md diff --git a/specification/sql/resource-manager/readme.md b/specification/sql/resource-manager/readme.md index 9e6aeaadf6a6..e98d72fc8cef 100644 --- a/specification/sql/resource-manager/readme.md +++ b/specification/sql/resource-manager/readme.md @@ -1426,6 +1426,7 @@ This is not used by Autorest itself. swagger-to-sdk: - repo: azure-sdk-for-net - repo: azure-sdk-for-python + - repo: azure-sdk-for-python-track2 - repo: azure-sdk-for-java - repo: azure-sdk-for-go - repo: azure-sdk-for-node @@ -1452,33 +1453,7 @@ csharp: ### Python -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) -python-mode: create -python: - azure-arm: true - license-header: MICROSOFT_MIT_NO_VERSION - payload-flattening-threshold: 2 - namespace: azure.mgmt.sql - package-name: azure-mgmt-sql - package-version: 0.9.0 - clear-output-folder: true -``` - -``` yaml $(python) && $(python-mode) == 'update' -python: - no-namespace-folders: true - output-folder: $(python-sdks-folder)/sql/azure-mgmt-sql/azure/mgmt/sql -``` - -``` yaml $(python) && $(python-mode) == 'create' -python: - basic-setup-py: true - output-folder: $(python-sdks-folder)/sql/azure-mgmt-sql -``` +See configuration in [readme.python.md](./readme.python.md) ### Go diff --git a/specification/sql/resource-manager/readme.python.md b/specification/sql/resource-manager/readme.python.md new file mode 100644 index 000000000000..fff44f6b620b --- /dev/null +++ b/specification/sql/resource-manager/readme.python.md @@ -0,0 +1,49 @@ +### Python + +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)&& !$(track2) +python-mode: create +python: + azure-arm: true + license-header: MICROSOFT_MIT_NO_VERSION + payload-flattening-threshold: 2 + namespace: azure.mgmt.sql + package-name: azure-mgmt-sql + package-version: 0.9.0 + clear-output-folder: true +``` + +``` yaml $(python)&& $(track2) +python-mode: create +azure-arm: true +license-header: MICROSOFT_MIT_NO_VERSION +namespace: azure.mgmt.sql +package-name: azure-mgmt-sql +package-version: 0.9.0 +clear-output-folder: true +``` + +``` yaml $(python) && $(python-mode) == 'update'&& !$(track2) +python: + no-namespace-folders: true + output-folder: $(python-sdks-folder)/sql/azure-mgmt-sql/azure/mgmt/sql +``` + +``` yaml $(python) && $(python-mode) == 'create'&& !$(track2) +python: + basic-setup-py: true + output-folder: $(python-sdks-folder)/sql/azure-mgmt-sql +``` + +``` yaml $(python) && $(python-mode) == 'update'&& $(track2) +no-namespace-folders: true +output-folder: $(python-sdks-folder)/sql/azure-mgmt-sql/azure/mgmt/sql +``` + +``` yaml $(python) && $(python-mode) == 'create'&& $(track2) +basic-setup-py: true +output-folder: $(python-sdks-folder)/sql/azure-mgmt-sql +``` \ No newline at end of file From 70e264164f09afa16ea72e31c4d8d050f35262d0 Mon Sep 17 00:00:00 2001 From: Zed <601306339@qq.com> Date: Wed, 12 May 2021 11:22:07 +0800 Subject: [PATCH 02/11] readme config --- specification/sql/resource-manager/readme.python.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/specification/sql/resource-manager/readme.python.md b/specification/sql/resource-manager/readme.python.md index fff44f6b620b..39b86e5fe800 100644 --- a/specification/sql/resource-manager/readme.python.md +++ b/specification/sql/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)&& !$(track2) +``` yaml $(python) && !$(track2) python-mode: create python: azure-arm: true @@ -16,7 +16,7 @@ python: clear-output-folder: true ``` -``` yaml $(python)&& $(track2) +``` yaml $(python) && $(track2) python-mode: create azure-arm: true license-header: MICROSOFT_MIT_NO_VERSION @@ -26,24 +26,24 @@ package-version: 0.9.0 clear-output-folder: true ``` -``` yaml $(python) && $(python-mode) == 'update'&& !$(track2) +``` yaml $(python) && $(python-mode) == 'update' && !$(track2) python: no-namespace-folders: true output-folder: $(python-sdks-folder)/sql/azure-mgmt-sql/azure/mgmt/sql ``` -``` yaml $(python) && $(python-mode) == 'create'&& !$(track2) +``` yaml $(python) && $(python-mode) == 'create' && !$(track2) python: basic-setup-py: true output-folder: $(python-sdks-folder)/sql/azure-mgmt-sql ``` -``` yaml $(python) && $(python-mode) == 'update'&& $(track2) +``` yaml $(python) && $(python-mode) == 'update' && $(track2) no-namespace-folders: true output-folder: $(python-sdks-folder)/sql/azure-mgmt-sql/azure/mgmt/sql ``` -``` yaml $(python) && $(python-mode) == 'create'&& $(track2) +``` yaml $(python) && $(python-mode) == 'create' && $(track2) basic-setup-py: true output-folder: $(python-sdks-folder)/sql/azure-mgmt-sql ``` \ No newline at end of file From 624cc268b2651df4e4a7a09759958adf80247557 Mon Sep 17 00:00:00 2001 From: msyyc <70930885+msyyc@users.noreply.github.com> Date: Wed, 12 May 2021 15:27:30 +0800 Subject: [PATCH 03/11] Update readme.python.md --- specification/sql/resource-manager/readme.python.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/specification/sql/resource-manager/readme.python.md b/specification/sql/resource-manager/readme.python.md index 39b86e5fe800..ec2988c8da73 100644 --- a/specification/sql/resource-manager/readme.python.md +++ b/specification/sql/resource-manager/readme.python.md @@ -24,6 +24,8 @@ namespace: azure.mgmt.sql package-name: azure-mgmt-sql package-version: 0.9.0 clear-output-folder: true +modelerfour: + lenient-model-deduplication: true ``` ``` yaml $(python) && $(python-mode) == 'update' && !$(track2) @@ -46,4 +48,4 @@ output-folder: $(python-sdks-folder)/sql/azure-mgmt-sql/azure/mgmt/sql ``` yaml $(python) && $(python-mode) == 'create' && $(track2) basic-setup-py: true output-folder: $(python-sdks-folder)/sql/azure-mgmt-sql -``` \ No newline at end of file +``` From 72dd592bd16b790869c73c8ea3962ec326ee3270 Mon Sep 17 00:00:00 2001 From: Zed <601306339@qq.com> Date: Thu, 13 May 2021 10:09:49 +0800 Subject: [PATCH 04/11] conflient resolve --- specification/sql/resource-manager/readme.python.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/specification/sql/resource-manager/readme.python.md b/specification/sql/resource-manager/readme.python.md index 64da894d43b7..ec2988c8da73 100644 --- a/specification/sql/resource-manager/readme.python.md +++ b/specification/sql/resource-manager/readme.python.md @@ -48,8 +48,4 @@ output-folder: $(python-sdks-folder)/sql/azure-mgmt-sql/azure/mgmt/sql ``` yaml $(python) && $(python-mode) == 'create' && $(track2) basic-setup-py: true output-folder: $(python-sdks-folder)/sql/azure-mgmt-sql -<<<<<<< HEAD ``` -======= -``` ->>>>>>> azure/master From 4fabdfcdd31b7900bfd23d460c92efa687602489 Mon Sep 17 00:00:00 2001 From: Zed <601306339@qq.com> Date: Fri, 4 Jun 2021 15:15:05 +0800 Subject: [PATCH 05/11] security t2 config --- .../security/resource-manager/readme.md | 1 + .../resource-manager/readme.python.md | 24 ++++++++++++++++--- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/specification/security/resource-manager/readme.md b/specification/security/resource-manager/readme.md index 23c851a84205..e5e17acb1387 100644 --- a/specification/security/resource-manager/readme.md +++ b/specification/security/resource-manager/readme.md @@ -486,6 +486,7 @@ swagger-to-sdk: - repo: azure-sdk-for-net - repo: azure-sdk-for-go - repo: azure-sdk-for-python + - repo: azure-sdk-for-python-track2 - repo: azure-sdk-for-js - repo: azure-sdk-for-node - repo: azure-resource-manager-schemas diff --git a/specification/security/resource-manager/readme.python.md b/specification/security/resource-manager/readme.python.md index 46bfb3c58b8f..e31072546c98 100644 --- a/specification/security/resource-manager/readme.python.md +++ b/specification/security/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-mode: create python: azure-arm: true @@ -15,13 +15,31 @@ python: package-version: 0.1.0 clear-output-folder: true ``` -``` yaml $(python) && $(python-mode) == 'update' +``` yaml $(python) && $(track2) +python-mode: create +azure-arm: true +license-header: MICROSOFT_MIT_NO_VERSION +namespace: azure.mgmt.security +package-name: azure-mgmt-security +package-version: 1.0.0b1 +clear-output-folder: true +``` + +``` yaml $(python) && $(python-mode) == 'update' && !$(track2) python: no-namespace-folders: true output-folder: $(python-sdks-folder)/security/azure-mgmt-security/azure/mgmt/security ``` -``` yaml $(python) && $(python-mode) == 'create' +``` yaml $(python) && $(python-mode) == 'create' && !$(track2) python: basic-setup-py: true output-folder: $(python-sdks-folder)/security/azure-mgmt-security ``` +``` yaml $(python) && $(python-mode) == 'update' && $(track2) +no-namespace-folders: true +output-folder: $(python-sdks-folder)/security/azure-mgmt-security/azure/mgmt/security +``` +``` yaml $(python) && $(python-mode) == 'create' && $(track2) +basic-setup-py: true +output-folder: $(python-sdks-folder)/security/azure-mgmt-security +``` From c5ba7d0bf2c98e6f2914a51472ea3851352a1e09 Mon Sep 17 00:00:00 2001 From: Zed <601306339@qq.com> Date: Fri, 4 Jun 2021 15:31:00 +0800 Subject: [PATCH 06/11] modelerfour config --- specification/security/resource-manager/readme.python.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/specification/security/resource-manager/readme.python.md b/specification/security/resource-manager/readme.python.md index e31072546c98..4b1e1bb020f9 100644 --- a/specification/security/resource-manager/readme.python.md +++ b/specification/security/resource-manager/readme.python.md @@ -23,6 +23,8 @@ namespace: azure.mgmt.security package-name: azure-mgmt-security package-version: 1.0.0b1 clear-output-folder: true +modelerfour: + lenient-model-deduplication: true ``` ``` yaml $(python) && $(python-mode) == 'update' && !$(track2) From 834096b05026b289584a9735cf466c28688850a5 Mon Sep 17 00:00:00 2001 From: Zed <601306339@qq.com> Date: Mon, 7 Jun 2021 16:09:42 +0800 Subject: [PATCH 07/11] Delete duplicate JSON files --- specification/security/resource-manager/readme.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/specification/security/resource-manager/readme.md b/specification/security/resource-manager/readme.md index e5e17acb1387..f18212ae14e3 100644 --- a/specification/security/resource-manager/readme.md +++ b/specification/security/resource-manager/readme.md @@ -187,10 +187,6 @@ input-file: - Microsoft.Security/stable/2019-08-01/deviceSecurityGroups.json - Microsoft.Security/stable/2019-08-01/iotSecuritySolutions.json - Microsoft.Security/stable/2019-08-01/iotSecuritySolutionAnalytics.json -- Microsoft.Security/stable/2019-08-01/iotAlertTypes.json -- Microsoft.Security/stable/2019-08-01/iotAlerts.json -- Microsoft.Security/stable/2019-08-01/iotRecommendationTypes.json -- Microsoft.Security/stable/2019-08-01/iotRecommendations.json - Microsoft.Security/preview/2015-06-01-preview/locations.json - Microsoft.Security/preview/2015-06-01-preview/operations.json - Microsoft.Security/preview/2015-06-01-preview/tasks.json From 66e900bb22811746d17f8611bca1460cd13369bb Mon Sep 17 00:00:00 2001 From: Zed <601306339@qq.com> Date: Mon, 7 Jun 2021 17:29:14 +0800 Subject: [PATCH 08/11] del test --- specification/security/resource-manager/readme.md | 1 - 1 file changed, 1 deletion(-) diff --git a/specification/security/resource-manager/readme.md b/specification/security/resource-manager/readme.md index f18212ae14e3..26cf2aa4899c 100644 --- a/specification/security/resource-manager/readme.md +++ b/specification/security/resource-manager/readme.md @@ -209,7 +209,6 @@ input-file: - Microsoft.Security/stable/2020-01-01/jitNetworkAccessPolicies.json - Microsoft.Security/stable/2020-01-01/discoveredSecuritySolutions.json - Microsoft.Security/stable/2020-01-01/securitySolutionsReferenceData.json -- Microsoft.Security/stable/2020-01-01/externalSecuritySolutions.json - Microsoft.Security/stable/2020-01-01/secureScore.json - Microsoft.Security/stable/2020-01-01/SecuritySolutions.json - Microsoft.Security/preview/2020-01-01-preview/connectors.json From a552af0600e00a8aecf9548c4a72fe20dec3dc63 Mon Sep 17 00:00:00 2001 From: msyyc <70930885+msyyc@users.noreply.github.com> Date: Tue, 8 Jun 2021 11:01:55 +0800 Subject: [PATCH 09/11] Update readme.md --- specification/security/resource-manager/readme.md | 1 + 1 file changed, 1 insertion(+) diff --git a/specification/security/resource-manager/readme.md b/specification/security/resource-manager/readme.md index 26cf2aa4899c..f18212ae14e3 100644 --- a/specification/security/resource-manager/readme.md +++ b/specification/security/resource-manager/readme.md @@ -209,6 +209,7 @@ input-file: - Microsoft.Security/stable/2020-01-01/jitNetworkAccessPolicies.json - Microsoft.Security/stable/2020-01-01/discoveredSecuritySolutions.json - Microsoft.Security/stable/2020-01-01/securitySolutionsReferenceData.json +- Microsoft.Security/stable/2020-01-01/externalSecuritySolutions.json - Microsoft.Security/stable/2020-01-01/secureScore.json - Microsoft.Security/stable/2020-01-01/SecuritySolutions.json - Microsoft.Security/preview/2020-01-01-preview/connectors.json From ac590d0a25f057fed853a4ceae067658c893ca53 Mon Sep 17 00:00:00 2001 From: msyyc <70930885+msyyc@users.noreply.github.com> Date: Tue, 8 Jun 2021 13:47:15 +0800 Subject: [PATCH 10/11] directive x-ms-enum --- .../resource-manager/readme.python.md | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/specification/security/resource-manager/readme.python.md b/specification/security/resource-manager/readme.python.md index 4b1e1bb020f9..448922f953a8 100644 --- a/specification/security/resource-manager/readme.python.md +++ b/specification/security/resource-manager/readme.python.md @@ -45,3 +45,23 @@ output-folder: $(python-sdks-folder)/security/azure-mgmt-security/azure/mgmt/sec basic-setup-py: true output-folder: $(python-sdks-folder)/security/azure-mgmt-security ``` + +```yaml $(python) && $(track2) +directive: + - from: swagger-document + where: $.definitions.AadConnectivityState.properties.connectivityState + transform: > + $['x-ms-enum']['name'] = 'AadConnectivityStateEnum'; + - from: swagger-document + where: $.definitions.ExternalSecuritySolutionKind.properties.kind + transform: > + $['x-ms-enum']['name'] = 'ExternalSecuritySolutionKindEnum'; + - from: jitNetworkAccessPolicies.json + where: $.definitions.JitNetworkAccessPortRule.properties.protocol + transform: > + $['x-ms-enum']['name'] = 'protocolEnum'; + - from: alerts.json + where: $.definitions.AlertSimulatorRequestProperties.properties.kind + transform: > + $['x-ms-enum']['name'] = 'kindEnum'; +``` \ No newline at end of file From 2f587dc49a8eaf1817241d92ecb6bf406f08a313 Mon Sep 17 00:00:00 2001 From: msyyc <70930885+msyyc@users.noreply.github.com> Date: Wed, 9 Jun 2021 13:55:24 +0800 Subject: [PATCH 11/11] delete redundant definition --- .../stable/2020-01-01/applicationWhitelistings.json | 8 -------- 1 file changed, 8 deletions(-) diff --git a/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/applicationWhitelistings.json b/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/applicationWhitelistings.json index 4bfa1d9d474d..4c449c09d25e 100644 --- a/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/applicationWhitelistings.json +++ b/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/applicationWhitelistings.json @@ -553,10 +553,6 @@ "description": "Include the policy rules", "type": "boolean", "required": false, - "enum": [ - false, - true - ], "x-ms-parameter-location": "method" }, "Summary": { @@ -565,10 +561,6 @@ "description": "Return output in a summarized form", "type": "boolean", "required": false, - "enum": [ - false, - true - ], "x-ms-parameter-location": "method" }, "AdaptiveApplicationControlGroup": {