diff --git a/specification/advisor/resource-manager/readme.md b/specification/advisor/resource-manager/readme.md index d631a4e49820..6e9ca7ba8d72 100644 --- a/specification/advisor/resource-manager/readme.md +++ b/specification/advisor/resource-manager/readme.md @@ -85,7 +85,7 @@ This is not used by Autorest itself. ``` yaml $(swagger-to-sdk) 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-js @@ -93,54 +93,14 @@ swagger-to-sdk: - repo: azure-resource-manager-schemas ``` -## 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.advisor - package-name: azure-mgmt-advisor - package-version: 1.0.1 - clear-output-folder: true -``` - -``` yaml $(python) && $(track2) -python-mode: create -azure-arm: true -license-header: MICROSOFT_MIT_NO_VERSION -namespace: azure.mgmt.advisor -package-name: azure-mgmt-advisor -package-version: 9.0.0b1 -clear-output-folder: true -``` - -``` yaml $(python) && $(python-mode) == 'update' -no-namespace-folders: true -output-folder: $(python-sdks-folder)/advisor/azure-mgmt-advisor/azure/mgmt/advisor -python: - no-namespace-folders: true - output-folder: $(python-sdks-folder)/advisor/azure-mgmt-advisor/azure/mgmt/advisor -``` - -``` yaml $(python) && $(python-mode) == 'create' -basic-setup-py: true -output-folder: $(python-sdks-folder)/advisor/azure-mgmt-advisor -python: - basic-setup-py: true - output-folder: $(python-sdks-folder)/advisor/azure-mgmt-advisor -``` - ## Go See configuration in [readme.go.md](./readme.go.md) +## Python + +See configuration in [readme.python.md](./readme.python.md) + ## C# These settings apply only when `--csharp` is specified on the command line. diff --git a/specification/advisor/resource-manager/readme.python.md b/specification/advisor/resource-manager/readme.python.md new file mode 100644 index 000000000000..4fc829a9b050 --- /dev/null +++ b/specification/advisor/resource-manager/readme.python.md @@ -0,0 +1,24 @@ +## 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) +azure-arm: true +license-header: MICROSOFT_MIT_NO_VERSION +namespace: azure.mgmt.advisor +package-name: azure-mgmt-advisor +package-version: 9.0.0b1 +clear-output-folder: true +``` + +``` yaml $(python) && $(python-mode) == 'update' && $(track2) +no-namespace-folders: true +output-folder: $(python-sdks-folder)/advisor/azure-mgmt-advisor/azure/mgmt/advisor +``` + +``` yaml $(python) && $(python-mode) == 'create' && $(track2) +basic-setup-py: true +output-folder: $(python-sdks-folder)/advisor/azure-mgmt-advisor +``` diff --git a/specification/commerce/resource-manager/readme.md b/specification/commerce/resource-manager/readme.md index 78eeba4be483..9decb8b7ce87 100644 --- a/specification/commerce/resource-manager/readme.md +++ b/specification/commerce/resource-manager/readme.md @@ -59,9 +59,7 @@ This is not used by Autorest itself. ``` yaml $(swagger-to-sdk) swagger-to-sdk: - - repo: azure-sdk-for-python - after_scripts: - - python ./scripts/multiapi_init_gen.py azure-mgmt-commerce + - repo: azure-sdk-for-python-track2 - repo: azure-sdk-for-java - repo: azure-sdk-for-go - repo: azure-sdk-for-js @@ -75,43 +73,7 @@ swagger-to-sdk: ## 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.commerce - package-name: azure-mgmt-commerce - clear-output-folder: true - no-namespace-folders: true -``` - -### Python multi-api - -Generate all API versions currently shipped for this package - -```yaml $(python) && $(multiapi) -batch: - - tag: package-2015-06-preview -``` - -### Tag: package-2015-06-preview and python - -These settings apply only when `--tag=package-2015-06-preview --python` is specified on the command line. -Please also specify `--python-sdks-folder=`. - -``` yaml $(tag) == 'package-2015-06-preview' && $(python) -namespace: azure.mgmt.commerce.v2015_06_01_preview -output-folder: $(python-sdks-folder)/commerce/azure-mgmt-commerce/azure/mgmt/commerce/v2015_06_01_preview -python: - namespace: azure.mgmt.commerce.v2015_06_01_preview - output-folder: $(python-sdks-folder)/commerce/azure-mgmt-commerce/azure/mgmt/commerce/v2015_06_01_preview -``` +See configuration in [readme.python.md](./readme.python.md) ## Go diff --git a/specification/commerce/resource-manager/readme.python.md b/specification/commerce/resource-manager/readme.python.md new file mode 100644 index 000000000000..a89b9c1df3a8 --- /dev/null +++ b/specification/commerce/resource-manager/readme.python.md @@ -0,0 +1,48 @@ +## Python + +These settings apply only when `--track2` is specified on the command line. + +``` yaml $(track2) +azure-arm: true +license-header: MICROSOFT_MIT_NO_VERSION +package-name: azure-mgmt-commerce +package-version: 1.0.0b1 +no-namespace-folders: true +``` + +### Python multi-api + +Generate all API versions currently shipped for this package + +```yaml $(multiapi) +clear-output-folder: true +batch: + - tag: package-2015-06-preview + - multiapiscript: true +``` + +``` yaml $(multiapiscript) +output-folder: $(python-sdks-folder)/commerce/azure-mgmt-commerce/azure/mgmt/commerce/ +clear-output-folder: false +perform-load: false +``` + +### Tag: package-2015-06-preview and python + +These settings apply only when `--tag=package-2015-06-preview --python` is specified on the command line. +Please also specify `--python-sdks-folder=`. + +``` yaml $(tag) == 'package-2015-06-preview' +namespace: azure.mgmt.commerce.v2015_06_01_preview +output-folder: $(python-sdks-folder)/commerce/azure-mgmt-commerce/azure/mgmt/commerce/v2015_06_01_preview +``` + +``` yaml $(python) && $(track2) +modelerfour: + lenient-model-deduplication: true +directive: + - from: swagger-document + where: $.definitions.OfferTermInfo.properties.Name + transform: > + $['x-ms-enum']['name'] = 'OfferTermInfoEnum'; +``` diff --git a/specification/consumption/resource-manager/readme.md b/specification/consumption/resource-manager/readme.md index 43a5f80bdd34..bdc8e3d7c472 100644 --- a/specification/consumption/resource-manager/readme.md +++ b/specification/consumption/resource-manager/readme.md @@ -230,7 +230,6 @@ This is not used by Autorest itself. 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-java - repo: azure-sdk-for-js diff --git a/specification/consumption/resource-manager/readme.python.md b/specification/consumption/resource-manager/readme.python.md index 59aa8be66709..da32a2eb292b 100644 --- a/specification/consumption/resource-manager/readme.python.md +++ b/specification/consumption/resource-manager/readme.python.md @@ -4,40 +4,23 @@ 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.consumption - package-name: azure-mgmt-consumption - package-version: 2.0.0 - clear-output-folder: true -``` + ``` yaml $(python) && $(track2) -python-mode: create azure-arm: true license-header: MICROSOFT_MIT_NO_VERSION payload-flattening-threshold: 2 namespace: azure.mgmt.consumption package-name: azure-mgmt-consumption -package-version: 2.0.0 +package-version: 1.0.0b1 clear-output-folder: true ``` -``` yaml $(python) && $(python-mode) == 'update' -python: - no-namespace-folders: true - output-folder: $(python-sdks-folder)/consumption/azure-mgmt-consumption/azure/mgmt/consumption +``` yaml $(python) && $(python-mode) == 'update' && $(track2) no-namespace-folders: true output-folder: $(python-sdks-folder)/consumption/azure-mgmt-consumption/azure/mgmt/consumption ``` -``` yaml $(python) && $(python-mode) == 'create' -python: - basic-setup-py: true - output-folder: $(python-sdks-folder)/consumption/azure-mgmt-consumption +``` yaml $(python) && $(python-mode) == 'create' && $(track2) basic-setup-py: true output-folder: $(python-sdks-folder)/consumption/azure-mgmt-consumption ``` diff --git a/specification/reservations/resource-manager/readme.md b/specification/reservations/resource-manager/readme.md index d17ad6db7c1b..fb10f82f2645 100644 --- a/specification/reservations/resource-manager/readme.md +++ b/specification/reservations/resource-manager/readme.md @@ -109,7 +109,6 @@ This is not used by Autorest itself. ``` yaml $(swagger-to-sdk) swagger-to-sdk: - repo: azure-sdk-for-net - - repo: azure-sdk-for-python - repo: azure-sdk-for-python-track2 - repo: azure-sdk-for-go - repo: azure-sdk-for-js diff --git a/specification/reservations/resource-manager/readme.python.md b/specification/reservations/resource-manager/readme.python.md index c2d23b97bf67..d9bd9e5db1df 100644 --- a/specification/reservations/resource-manager/readme.python.md +++ b/specification/reservations/resource-manager/readme.python.md @@ -4,38 +4,15 @@ 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.reservations - package-name: azure-mgmt-reservations - package-version: 0.3.2 - clear-output-folder: true -``` ``` yaml $(python) && $(track2) -python-mode: create azure-arm: true license-header: MICROSOFT_MIT_NO_VERSION namespace: azure.mgmt.reservations package-name: azure-mgmt-reservations -package-version: 0.3.2 +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)/reservations/azure-mgmt-reservations/azure/mgmt/reservations -``` -``` yaml $(python) && $(python-mode) == 'create' && !$(track2) -python: - basic-setup-py: true - output-folder: $(python-sdks-folder)/reservations/azure-mgmt-reservations -``` - ``` yaml $(python) && $(python-mode) == 'update' && $(track2) no-namespace-folders: true output-folder: $(python-sdks-folder)/reservations/azure-mgmt-reservations/azure/mgmt/reservations