You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
autorest readme.md --python --use="@microsoft.azure/autorest.python@~4.0.71" --python-mode=update --python-sdks-folder=<root of sdk clone>/sdks/ --no-async
32
32
```
33
33
34
-
Which means "Generate the Python code for the Swagger mentioned in this readme, using autorest for Pyton v4.0.71 or above (but not v5), do not generate async files, generate multiapi if supported (if not ignore), and assume the package was already generated and it's an update"
34
+
Which means "Generate the Python code for the Swagger mentioned in this readme, using autorest for Python v4.0.71 or above (but not v5), do not generate async files, and assume the package was already generated and it's an update"
35
35
36
36
In practical terms, this is not necessary since the Python SDK has the necessary tooling to simplify to just specify the readme.md:
Copy file name to clipboardExpand all lines: doc/dev/mgmt/mgmt_release.md
-4Lines changed: 0 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -125,11 +125,7 @@ Example:
125
125
- Added operation group TrafficManagerUserMetricsKeysOperations
126
126
```
127
127
128
-
### Note on multi-api packages
129
128
130
-
If a package is using multi-api, this means it contains several Autorest generated folder. The tool will then build one report per Autorest generation.
131
-
132
-
To simplify the change log call, the code report also build a "merged_report" that will merge correctly all api-versions and build a report suitable *for the default floating latest*
Copy file name to clipboardExpand all lines: doc/dev/mgmt/swagger_conf.md
+2-29Lines changed: 2 additions & 29 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,11 +14,10 @@ In practical terms, we want to control the version of Autorest used, the output
14
14
15
15
## Writing the readme
16
16
17
-
Writing the readme is the responsibility of the Python SDK team. There is currently two types of templates for Python readmes:
17
+
Writing the readme is the responsibility of the Python SDK team. There is currently one type of template for Python readmes:
18
18
- Readme that handles only one API version, and generates packages that handle one API version only
19
-
- Readme that handles several API versions, and generates packages with multiples API and profile supports
20
19
21
-
These templates can be found in the [single_api](https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/mgmt/swagger/single_api)and the [multi_api](https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/mgmt/swagger/multi_api) folders.
20
+
Templates can be found in the [single_api](https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/mgmt/swagger/single_api)folder.
22
21
23
22
24
23
### Single API readmes
@@ -27,31 +26,5 @@ This one is the most simple:
27
26
- Copy the [readme.python.md](https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/mgmt/swagger/single_api/readme.python.md) and replace `servicetoreplace` by your service name
28
27
- Be sure the main [readme.md](https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/mgmt/swagger/single_api/readme.md) contains a "swagger-to-sdk" section with Python
29
28
30
-
### Multi API readmes
31
29
32
-
When doing multi-api packages, it means you have shipping several "tags" of the main readme as one package. Autorest is calling this process a "batch" call, and this is the purpose of the "batch" section in [readme.python.md](https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/mgmt/swagger/multi_api/readme.python.md).
33
-
34
-
In order to be sure the correct tags exist, you can use the following script:
This script will analyze the Swaggers available, and suggests on stdout:
40
-
- A list of tags for the main [readme.md](https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/mgmt/swagger/multi_api/readme.md)
41
-
- A batch declaration for the [readme.python.md](https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/mgmt/swagger/multi_api/readme.python.md)
42
-
43
-
This script is not perfect that it *does* require manual review of the output and not a direct copy/paste.
44
-
45
-
It's important for Python that tags represents only *ONE* unique API version. It's why it's pretty common that Python uses a set of tags that other languages don't use.
46
-
47
-
Once you know the list of tags you need to generate:
48
-
49
-
- Copy the [readme.python.md](https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/mgmt/swagger/multi_api/readme.python.md) and replace `servicetoreplace` by your service name
50
-
- Update the batch list of [readme.python.md](https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/mgmt/swagger/multi_api/readme.python.md)
51
-
- Be sure you have one tag section for each batch entry in [readme.python.md](https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/mgmt/swagger/multi_api/readme.python.md)
52
-
- Be sure the main [readme.md](https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/mgmt/swagger/multi_api/readme.md) contains a "swagger-to-sdk" section with Python with an `afterscripts` section like the one in the template.
53
-
54
-
The `afterscripts` will execute a Jinja template to create a client to link together all the batch generated autorest ([example](https://github.com/Azure/azure-sdk-for-python/blob/4a7c67189591b052fe2b5769847ff68f7845386d/sdk/storage/azure-mgmt-storage/azure/mgmt/storage/_storage_management_client.py))
55
-
56
-
This script will infer a default `LATEST_PROFILE`. You can change this behavior and force the default API version if necessary ([example](https://github.com/Azure/azure-rest-api-specs/blob/49238f0b2917452311e71dd43c4164de70af3721/specification/authorization/resource-manager/readme.md#swagger-to-sdk))
Copy file name to clipboardExpand all lines: doc/dev/private_package/get_private_package.md
+3-9Lines changed: 3 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,19 +10,13 @@ Make sure your target tag is defined in `readme.md` and **default tag is same wi
10
10
11
11

12
12
13
-
## 2.Configure `readme.python.md`
14
-
15
-
If there is no `Python multi-api` in `readme.python.md`(i.e. [datadog](https://github.com/Azure/azure-rest-api-specs/blob/main/specification/datadog/resource-manager/readme.python.md)), skip this step.
16
-
17
-
If there is `Python multi-api` in `readme.python.md` (i.e. [network](https://github.com/Azure/azure-rest-api-specs/blob/main/specification/network/resource-manager/readme.python.md#python-multi-api)), you need additional configuration: [Python Multiapi Configuration](https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/private_package/python_multiapi_configuration.md)
18
-
19
-
## 3.Trigger pipeline
13
+
## 2.Trigger pipeline
20
14
21
15
Submit a PR or draft PR to [Azure/azure-rest-api-specs](https://github.com/Azure/azure-rest-api-specs)
22
16
23
17

24
18
25
-
## 4.Get private package
19
+
## 3.Get private package
26
20
27
21
Wait until pipelines finish, then there will be wheel and zip of the package. Just Click to download them.
28
22
@@ -32,7 +26,7 @@ If there is no link in the figure above, it may be folded. You can also find it
Because of security issue, maybe there is no private link to download. Since there is still auto generated PR provided, you can build the private package locally based on the PR with [guidance](https://github.com/Azure/azure-sdk-for-python/wiki/Common-issues-about-Python-SDK#build-private-package-with-pr)
0 commit comments