From 4e3820497caa29ed0efada28a38cb4292cea9d55 Mon Sep 17 00:00:00 2001 From: ChenxiJiang333 <119990644+ChenxiJiang333@users.noreply.github.com> Date: Tue, 29 Oct 2024 15:11:29 +0800 Subject: [PATCH 1/2] [NeonPostgres] Update tspconfig for Python SDK (#31259) * python tspconfig * fix format * Update tspconfig.yaml * Update tspconfig.yaml --------- Co-authored-by: Yuchao Yan --- specification/liftrneon/Neon.Postgres.Management/client.tsp | 6 ++++++ .../liftrneon/Neon.Postgres.Management/tspconfig.yaml | 6 ++++++ 2 files changed, 12 insertions(+) create mode 100644 specification/liftrneon/Neon.Postgres.Management/client.tsp diff --git a/specification/liftrneon/Neon.Postgres.Management/client.tsp b/specification/liftrneon/Neon.Postgres.Management/client.tsp new file mode 100644 index 000000000000..fe59fbfdf439 --- /dev/null +++ b/specification/liftrneon/Neon.Postgres.Management/client.tsp @@ -0,0 +1,6 @@ +import "./main.tsp"; +import "@azure-tools/typespec-client-generator-core"; + +using Azure.ClientGenerator.Core; + +@@clientName(Neon.Postgres, "NeonPostgresMgmtClient", "python"); diff --git a/specification/liftrneon/Neon.Postgres.Management/tspconfig.yaml b/specification/liftrneon/Neon.Postgres.Management/tspconfig.yaml index e1ce530f8bde..4f80c23dbbff 100644 --- a/specification/liftrneon/Neon.Postgres.Management/tspconfig.yaml +++ b/specification/liftrneon/Neon.Postgres.Management/tspconfig.yaml @@ -21,3 +21,9 @@ options: namespace: "Azure.ResourceManager.NeonPostgres" model-namespace: false generate-sample-project: false + "@azure-tools/typespec-python": + package-dir: "azure-mgmt-neonpostgres" + package-name: "{package-dir}" + flavor: "azure" + generate-test: true + generate-sample: true From e3a408f929747f1e6d5252ca042792895fe0fa40 Mon Sep 17 00:00:00 2001 From: ChenxiJiang333 <119990644+ChenxiJiang333@users.noreply.github.com> Date: Tue, 29 Oct 2024 16:03:54 +0800 Subject: [PATCH 2/2] [resourcehealth] Update readme.python.md (#31295) * Update readme.python.md * Update readme.python.md --- .../resource-manager/readme.python.md | 71 +++---------------- 1 file changed, 8 insertions(+), 63 deletions(-) diff --git a/specification/resourcehealth/resource-manager/readme.python.md b/specification/resourcehealth/resource-manager/readme.python.md index 3235ef7531fb..d88b796069c3 100644 --- a/specification/resourcehealth/resource-manager/readme.python.md +++ b/specification/resourcehealth/resource-manager/readme.python.md @@ -1,74 +1,19 @@ ## Python -These settings apply only when `--track2` is specified on the command line. +These settings apply only when `--python` is specified on the command line. +Please also specify `--python-sdks-folder=`. ``` yaml $(python) azure-arm: true -title: ResourceHealthMgmtClient license-header: MICROSOFT_MIT_NO_VERSION package-name: azure-mgmt-resourcehealth -no-namespace-folders: true -package-version: 1.0.0b1 -``` - -### Python multi-api - -Generate all API versions currently shipped for this package - -```yaml $(python) -multiapi: true -default-api-version: "2022-10-01" +namespace: azure.mgmt.resourcehealth +package-version: 1.0.0 clear-output-folder: true -batch: - - tag: package-preview-2023-10 - - tag: package-2022-10 - - tag: package-2018-07-01 - - tag: package-2015-01 - - multiapiscript: true -``` - -``` yaml $(multiapiscript) -output-folder: $(python-sdks-folder)/resourcehealth/azure-mgmt-resourcehealth/azure/mgmt/resourcehealth/ -clear-output-folder: false -perform-load: false -``` - -### Tag: package-preview-2023-10 and python - -These settings apply only when `--tag=package-preview-2023-10 --python` is specified on the command line. -Please also specify `--python-sdks-folder=`. - -``` yaml $(tag) == 'package-preview-2023-10' -namespace: azure.mgmt.resourcehealth.v2023_10_01_preview -output-folder: $(python-sdks-folder)/resourcehealth/azure-mgmt-resourcehealth/azure/mgmt/resourcehealth/v2023_10_01_preview -``` - -### Tag: package-2022-10 and python - -These settings apply only when `--tag=package-2022-10 --python` is specified on the command line. -Please also specify `--python-sdks-folder=`. - -``` yaml $(tag) == 'package-2022-10' -namespace: azure.mgmt.resourcehealth.v2022_10_01 -output-folder: $(python-sdks-folder)/resourcehealth/azure-mgmt-resourcehealth/azure/mgmt/resourcehealth/v2022_10_01 -``` - -### Tag: package-2018-07-01 and python - -These settings apply only when `--tag=package-2018-07-01 --python` is specified on the command line. -Please also specify `--python-sdks-folder=`. - -``` yaml $(tag) == 'package-2018-07-01' -namespace: azure.mgmt.resourcehealth.v2018_07_01 -output-folder: $(python-sdks-folder)/resourcehealth/azure-mgmt-resourcehealth/azure/mgmt/resourcehealth/v2018_07_01 +title: ResourceHealthMgmtClient ``` -### Tag: package-2015-01 and python - -These settings apply only when `--tag=package-2015-01 --python` is specified on the command line. -Please also specify `--python-sdks-folder=`. - -``` yaml $(tag) == 'package-2015-01' -namespace: azure.mgmt.resourcehealth.v2015_01_01 -output-folder: $(python-sdks-folder)/resourcehealth/azure-mgmt-resourcehealth/azure/mgmt/resourcehealth/v2015_01_01 +``` yaml $(python) +no-namespace-folders: true +output-folder: $(python-sdks-folder)/resourcehealth/azure-mgmt-resourcehealth/azure/mgmt/resourcehealth ```