From 9b0ad25a348a5f9ccc341656c81c1d07f2c6f637 Mon Sep 17 00:00:00 2001 From: msyyc <70930885+msyyc@users.noreply.github.com> Date: Wed, 14 May 2025 18:27:48 +0800 Subject: [PATCH 1/4] convert to single api for storage --- .../storage/resource-manager/readme.python.md | 76 ++----------------- 1 file changed, 7 insertions(+), 69 deletions(-) diff --git a/specification/storage/resource-manager/readme.python.md b/specification/storage/resource-manager/readme.python.md index e035d151e933..fd00f7b3c6e7 100644 --- a/specification/storage/resource-manager/readme.python.md +++ b/specification/storage/resource-manager/readme.python.md @@ -1,81 +1,19 @@ ## Python These settings apply only when `--python` is specified on the command line. +Please also specify `--python-sdks-folder=`. -``` yaml +``` yaml $(python) +title: StorageManagementClient azure-arm: true license-header: MICROSOFT_MIT_NO_VERSION -package-name: azure-mgmt-storage +package-name: azure-mgmt-[[ServiceName]] +namespace: azure.mgmt.[[ServiceName]] package-version: 1.0.0b1 -no-namespace-folders: true -modelerfour: - lenient-model-deduplication: true -``` - -### Python multi-api - -Generate all API versions currently shipped for this package - -```yaml $(python) -multiapi: true -default-api-version: "2024-01-01" clear-output-folder: true -batch: - - tag: package-2024-01 - - tag: package-2019-06 - - tag: package-2017-10 - - tag: package-2016-01 - - multiapiscript: true -``` - -``` yaml $(multiapiscript) -output-folder: $(python-sdks-folder)/storage/azure-mgmt-storage/azure/mgmt/storage/ -perform-load: false -``` - -### Tag: package-2024-01 and python - -These settings apply only when `--tag=package-2024-01 --python` is specified on the command line. -Please also specify `--python-sdks-folder=`. - -``` yaml $(tag) == 'package-2024-01' -namespace: azure.mgmt.storage.v2024_01_01 -output-folder: $(python-sdks-folder)/storage/azure-mgmt-storage/azure/mgmt/storage/v2024_01_01 -``` - -### Tag: package-2019-06 and python - -These settings apply only when `--tag=package-2019-06 --python` is specified on the command line. -Please also specify `--python-sdks-folder=`. - -``` yaml $(tag) == 'package-2019-06' -namespace: azure.mgmt.storage.v2019_06_01 -output-folder: $(python-sdks-folder)/storage/azure-mgmt-storage/azure/mgmt/storage/v2019_06_01 -``` - -### Tag: package-2017-10 and python - -These settings apply only when `--tag=package-2017-10 --python` is specified on the command line. -Please also specify `--python-sdks-folder=`. - -``` yaml $(tag) == 'package-2017-10' -namespace: azure.mgmt.storage.v2017_10_01 -output-folder: $(python-sdks-folder)/storage/azure-mgmt-storage/azure/mgmt/storage/v2017_10_01 -``` - -### Tag: package-2016-01 and python - -These settings apply only when `--tag=package-2016-01 --python` is specified on the command line. -Please also specify `--python-sdks-folder=`. - -``` yaml $(tag) == 'package-2016-01' -namespace: azure.mgmt.storage.v2016_01_01 -output-folder: $(python-sdks-folder)/storage/azure-mgmt-storage/azure/mgmt/storage/v2016_01_01 ``` ``` yaml $(python) -directive: - - from: swagger-document - where: $.definitions.LeaseContainerRequest - transform: $['properties']['action']['x-ms-enum']['name'] = 'LeaseContainerRequestEnum' +no-namespace-folders: true +output-folder: $(python-sdks-folder)/[[ServiceName]]/azure-mgmt-[[ServiceName]]/azure/mgmt/[[ServiceName]] ``` From 3ca5b7637b4e74a545b27ee6f212a4f67d68caa9 Mon Sep 17 00:00:00 2001 From: msyyc <70930885+msyyc@users.noreply.github.com> Date: Wed, 14 May 2025 18:38:44 +0800 Subject: [PATCH 2/4] fix config --- specification/storage/resource-manager/readme.python.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/specification/storage/resource-manager/readme.python.md b/specification/storage/resource-manager/readme.python.md index fd00f7b3c6e7..e97ad63cf762 100644 --- a/specification/storage/resource-manager/readme.python.md +++ b/specification/storage/resource-manager/readme.python.md @@ -7,13 +7,13 @@ Please also specify `--python-sdks-folder= Date: Wed, 14 May 2025 18:39:48 +0800 Subject: [PATCH 3/4] fix config --- specification/storage/resource-manager/readme.python.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/specification/storage/resource-manager/readme.python.md b/specification/storage/resource-manager/readme.python.md index e97ad63cf762..090da093c030 100644 --- a/specification/storage/resource-manager/readme.python.md +++ b/specification/storage/resource-manager/readme.python.md @@ -17,3 +17,10 @@ clear-output-folder: true no-namespace-folders: true output-folder: $(python-sdks-folder)/storage/azure-mgmt-storage/azure/mgmt/storage ``` + +``` yaml $(python) +directive: + - from: swagger-document + where: $.definitions.LeaseContainerRequest + transform: $['properties']['action']['x-ms-enum']['name'] = 'LeaseContainerRequestEnum' +``` From 480e935ebd4997b230cebc908e5e270b1330ba0a Mon Sep 17 00:00:00 2001 From: Yuchao Yan Date: Thu, 15 May 2025 08:11:03 +0800 Subject: [PATCH 4/4] Update readme.python.md --- specification/storage/resource-manager/readme.python.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/specification/storage/resource-manager/readme.python.md b/specification/storage/resource-manager/readme.python.md index 090da093c030..d5a71d5049fa 100644 --- a/specification/storage/resource-manager/readme.python.md +++ b/specification/storage/resource-manager/readme.python.md @@ -19,6 +19,8 @@ output-folder: $(python-sdks-folder)/storage/azure-mgmt-storage/azure/mgmt/stora ``` ``` yaml $(python) +modelerfour: + lenient-model-deduplication: true directive: - from: swagger-document where: $.definitions.LeaseContainerRequest