From c694792542c714e49f391b5accd42125809345de Mon Sep 17 00:00:00 2001 From: zhangyan133 <77086185+zhangyan133@users.noreply.github.com> Date: Thu, 25 Mar 2021 11:21:03 +0800 Subject: [PATCH] cdn track2 configure (#13592) * cdn track2 configure * cdn only track2 config * fix Co-authored-by: Yan Zhang (WICRESOFT NORTH AMERICA LTD) Co-authored-by: 00Kai0 --- specification/cdn/resource-manager/readme.md | 2 +- .../cdn/resource-manager/readme.python.md | 38 ++++++++++--------- 2 files changed, 22 insertions(+), 18 deletions(-) diff --git a/specification/cdn/resource-manager/readme.md b/specification/cdn/resource-manager/readme.md index 3ddcacbcf73e..d21e0732c347 100644 --- a/specification/cdn/resource-manager/readme.md +++ b/specification/cdn/resource-manager/readme.md @@ -152,7 +152,7 @@ This is not used by Autorest itself. ``` yaml $(swagger-to-sdk) swagger-to-sdk: - - 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-net diff --git a/specification/cdn/resource-manager/readme.python.md b/specification/cdn/resource-manager/readme.python.md index a92bd7c26941..6066279baac2 100644 --- a/specification/cdn/resource-manager/readme.python.md +++ b/specification/cdn/resource-manager/readme.python.md @@ -4,24 +4,28 @@ 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 - license-header: MICROSOFT_MIT_NO_VERSION - payload-flattening-threshold: 2 - namespace: azure.mgmt.cdn - package-name: azure-mgmt-cdn - package-version: 2.0.0 - clear-output-folder: true +azure-arm: true +license-header: MICROSOFT_MIT_NO_VERSION +namespace: azure.mgmt.cdn +package-name: azure-mgmt-cdn +modelerfour: + lenient-model-deduplication: true +directive: + - from: swagger-document + where: $.definitions.DeliveryRuleAction.properties.name + transform: > + $['x-ms-enum'] = { + "name": "DeliveryRuleActionEnum", + "modelAsString": true + }; ``` -``` yaml $(python) && $(python-mode) == 'update' -python: - no-namespace-folders: true - output-folder: $(python-sdks-folder)/cdn/azure-mgmt-cdn/azure/mgmt/cdn +``` yaml $(python) && $(python-mode) == 'update' && $(track2) +no-namespace-folders: true +output-folder: $(python-sdks-folder)/cdn/azure-mgmt-cdn/azure/mgmt/cdn ``` -``` yaml $(python) && $(python-mode) == 'create' -python: - basic-setup-py: true - output-folder: $(python-sdks-folder)/cdn/azure-mgmt-cdn +``` yaml $(python) && $(python-mode) == 'create' && $(track2) +basic-setup-py: true +output-folder: $(python-sdks-folder)/cdn/azure-mgmt-cdn ```