зеркало из
1
0
Форкнуть 0
3 Generate Python Mgmt SDK
Yuchao Yan редактировал(а) эту страницу 2023-08-21 14:10:35 +08:00

Assume you have swagger PR for azure-rest-api-specs or azure-rest-api-specs-pr, this doc shows how to generate Python Mgmt SDK. Please make sure readme.md (here is sample readme.md) of your PR has added - repo: azure-sdk-for-python to swagger-to-sdk yaml section. And your PR must have readme.python.md (here is sample readme.python.md).

There are 2 ways to generate Mgmt SDK: online and local.

Online

With https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/private_package/get_private_package.md, you can get private package without any local work.

Local

If you want to generate SDK locally, follow the steps:

Prepare environment

generate code

Assume OpenApi repo and SDK repo are in folder D:\ and your service name is myservice, run:

D:\> autorest azure-rest-api-specs\specification\myservice\resource-manager\readme.md --python --python-sdks-folder=D:\dev\azure-sdk-for-python\sdk --use=@autorest/python@6.7.1 --use=@autorest/modelerfour@4.26.2 --version=3.9.7 --version-tolerant=False