diff --git a/documentation/code-gen/configure-python-sdk.md b/documentation/code-gen/configure-python-sdk.md index ad14782c78e2..2ffc81afbbcf 100644 --- a/documentation/code-gen/configure-python-sdk.md +++ b/documentation/code-gen/configure-python-sdk.md @@ -122,6 +122,18 @@ python: clear-output-folder: true ``` +``` yaml $(python-mode) == 'update' && !$(track2) +python: + no-namespace-folders: true + output-folder: $(python-sdks-folder)/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration +``` + +``` yaml $(python-mode) == 'create' && !$(track2) +python: + basic-setup-py: true + output-folder: $(python-sdks-folder)/appconfiguration/azure-mgmt-appconfiguration +``` + These settings apply only when `--track2` is specified on the command line. ``` yaml $(track2) // For track2: basic Python package information @@ -132,20 +144,12 @@ no-namespace-folders: true package-version: 0.1.0 ``` -``` yaml $(python-mode) == 'update' -// --------------- For track1 ----------------- -python: - no-namespace-folders: true - output-folder: $(python-sdks-folder)/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration - -// --------------- For track2 ----------------- +``` yaml $(python-mode) == 'update' && $(track2) no-namespace-folders: true output-folder: $(python-sdks-folder)/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration ``` -``` yaml $(python-mode) == 'create' -python: - basic-setup-py: true - output-folder: $(python-sdks-folder)/appconfiguration/azure-mgmt-appconfiguration + +``` yaml $(python-mode) == 'create' && $(track2) basic-setup-py: true output-folder: $(python-sdks-folder)/appconfiguration/azure-mgmt-appconfiguration ``` @@ -180,7 +184,7 @@ batch: - multiapiscript: true ``` -``` yaml $(multiapiscript) // For track2 +``` yaml $(multiapiscript) && $(track2) // For track2 output-folder: $(python-sdks-folder)/compute/azure-mgmt-compute/azure/mgmt/compute/ clear-output-folder: false perform-load: false @@ -197,12 +201,9 @@ Then, the output folder and namespace should be configured for each of the tag. These settings apply only when `--tag=package-2020-06-01-only --python` is specified on the command line. Please also specify `--python-sdks-folder=`. -``` yaml $(tag) == 'package-2020-06-01-only' +``` yaml $(tag) == 'package-2020-06-01-only' && $(track2) // For track2 namespace: azure.mgmt.compute.v2020_06_01 output-folder: $(python-sdks-folder)/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01 -python: - namespace: azure.mgmt.compute.v2020_06_01 - output-folder: $(python-sdks-folder)/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01 ``` ~~~ @@ -235,5 +236,5 @@ Track 2 is based on the latest AutoRest code generator ~~~ > autorest --reset -> autorest --python --track2 --use=@autorest/python@5.3.0 --python-sdks-folder=..\azure-sdk-for-python\sdk --multiapi --python-mode=update ..\azure-rest-api-specs\specification\appconfiguration\resource-manager\readme.md +> autorest --python --track2 --use=@autorest/python@5.4.1 --python-sdks-folder=..\azure-sdk-for-python\sdk --multiapi --python-mode=update ..\azure-rest-api-specs\specification\appconfiguration\resource-manager\readme.md ~~~ \ No newline at end of file diff --git a/documentation/samplefiles/readme.python.md b/documentation/samplefiles/readme.python.md index 02c57c7069cc..638ce3d4423f 100644 --- a/documentation/samplefiles/readme.python.md +++ b/documentation/samplefiles/readme.python.md @@ -3,19 +3,39 @@ These settings apply only when `--python` is specified on the command line. Please also specify `--python-sdks-folder=`. -``` yaml $(python) +``` yaml $(python) && !$(track2) +python: + azure-arm: true + license-header: MICROSOFT_MIT_NO_VERSION + package-name: azure-mgmt-[[ServiceName]] + no-namespace-folders: true + package-version: 1.0.0b1 +``` + +``` yaml $(python-mode) == 'update' && !$(track2) +python: + output-folder: $(python-sdks-folder)/[[ServiceName]]/azure-mgmt-[[ServiceName]]/azure/mgmt/[[ServiceName]] +``` +``` yaml $(python-mode) == 'create' && !$(track2) +python: + basic-setup-py: true + output-folder: $(python-sdks-folder)/[[ServiceName]]/azure-mgmt-[[ServiceName]] +``` + +``` yaml $(python) && $(track2) azure-arm: true license-header: MICROSOFT_MIT_NO_VERSION package-name: azure-mgmt-[[ServiceName]] no-namespace-folders: true -package-version: 1.0.0b1 ``` ``` yaml $(python-mode) == 'update' no-namespace-folders: true output-folder: $(python-sdks-folder)/[[ServiceName]]/azure-mgmt-[[ServiceName]]/azure/mgmt/[[ServiceName]] ``` -``` yaml $(python-mode) == 'create' + +``` yaml $(python-mode) == 'create' && $(track2) +package-version: 1.0.0b1 basic-setup-py: true output-folder: $(python-sdks-folder)/[[ServiceName]]/azure-mgmt-[[ServiceName]] ```