Skip to content

Commit 22789e5

Browse files
authored
Remove multiapi functionality from repository (#3188)
1 parent 1f05465 commit 22789e5

File tree

825 files changed

+26
-146748
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

825 files changed

+26
-146748
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
changeKind: deprecation
3+
packages:
4+
- "@autorest/python"
5+
---
6+
7+
Deprecate multiapi
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
changeKind: dependencies
3+
packages:
4+
- "@azure-tools/typespec-python"
5+
---
6+
7+
Bump dep on `http-client-python`

cspell.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,6 @@ words:
6969
- mros
7070
- mspaint
7171
- msrc
72-
- multiapi
73-
- multiapiclient
74-
- multiapinoasync
75-
- multiapisecurity
7672
- mutli
7773
- myenv
7874
- myoption

docs/client/initializing.md

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -68,25 +68,8 @@ client. Say your custom credential is called `MyCredential`, and the policy that
6868
client would look something like `client = PetsClient(credential=MyCredential(), authentication_policy=MyAuthenticationPolicy())`, though this of course varies
6969
based on inputs.
7070

71-
## Multi API Client
72-
73-
Initializing your Multi API client is very similar to initializing a normal client. The only difference is there's an added optional
74-
parameter `api_version`. With this parameter, you can specify the API version you want your client to have. If not specified, the multi
75-
API client uses the default API version.
76-
77-
Using the Multi API client we generated in our [multi API generation][multiapi_generation], our example client uses default API version
78-
`v2`. If we would like our client at runtime to have API version `v1`, we would initialize our client like:
79-
80-
```python
81-
from azure.identity import DefaultAzureCredential
82-
from azure.pets import PetsClient
83-
84-
client = PetsClient(credential=DefaultAzureCredential(), api_version="v1")
85-
```
86-
8771
<!-- LINKS -->
8872

89-
[multiapi_generation]: https://github.com/Azure/autorest.python/blob/main/docs/generate/multiapi.md
9073
[azure_core_library]: https://pypi.org/project/azure-core/
9174
[msrest_library]: https://pypi.org/project/msrest/
9275
[azure_mgmt_core_library]: https://pypi.org/project/azure-mgmt-core/

docs/client/models.md

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -16,24 +16,3 @@ from azure.pets.models import DogTypes
1616
1717
my_dog_type = DogTypes.DALMATIAN
1818
```
19-
20-
## Multi API
21-
22-
There is also a `models` module in a multi API client. There, you can access the latest version of each models.
23-
24-
If you want to access a specific API version's models, you can do so through the [`models()`][models_ex] class method we expose on the multi API client.
25-
It accepts optional parameter `api_version`. If specified, it will retrieve the models from that API version. Otherwise, retrieves models from the
26-
default API version the code was generated with. We've included a code snippet showing you how to access models in both situations.
27-
28-
```python
29-
from azure.multiapi.sample import MultiapiServiceClient
30-
from azure.identity import DefaultAzureCredential
31-
32-
client = MultiapiServiceClient(credential=DefaultAzureCredential())
33-
34-
default_api_version_models = client.models()
35-
v3_models = client.models(api_version='3.0.0')
36-
```
37-
38-
<!-- LINKS -->
39-
[models_ex]: https://github.com/Azure/autorest.python/blob/main/docs/packages/autorest.python/specification/multiapi/generated/azure/multiapi/sample/_multiapi_service_client.py#L91

docs/generate/multiapi.md

Lines changed: 0 additions & 76 deletions
This file was deleted.

docs/generate/readme.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,8 @@
22

33
Most of the information you'll need to generate a Python client can be found in the general docs [here][general]. In these docs, we go over a couple Python-specific scenarios.
44

5-
* [Generating Multi API code][multiapi]
65
* [Generating with Directives][directives]
76

87
<!-- LINKS -->
98
[general]: https://github.com/Azure/autorest/tree/master/docs/generate/readme.md
10-
[multiapi]: https://github.com/Azure/autorest.python/blob/main/docs/generate/multiapi.md
119
[directives]: https://github.com/Azure/autorest.python/blob/main/docs/generate/directives.md

eng/pipelines/ci.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -112,14 +112,6 @@ jobs:
112112
- template: generated-code-checks-template.yml
113113
parameters:
114114
folderName: "dpg/version-tolerant"
115-
- script: tox run -e ci
116-
displayName: 'Execute "multiapi" Tests - Python $(PythonVersion)'
117-
workingDirectory: $(Build.SourcesDirectory)/autorest.python/packages/autorest.python/test/multiapi
118-
119-
- script: tox run -e apiview
120-
displayName: 'Validate multiapi APIView - Python $(PythonVersion)'
121-
condition: and(succeededOrFailed(), eq(variables['PythonVersion'], '3.11'))
122-
workingDirectory: $(Build.SourcesDirectory)/autorest.python/packages/autorest.python/test/multiapi
123115

124116
- ${{ if eq(ne(variables['Build.Reason'], 'PullRequest'), 'True') }}:
125117
- script: |

eng/scripts/util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def run_check(name, call_back, log_info):
3434
"-t",
3535
"--test-folder",
3636
dest="test_folder",
37-
help="The test folder we're in. Can be 'azure', 'multiapi', or 'vanilla'",
37+
help="The test folder we're in. Can be 'azure' or 'vanilla'",
3838
required=True,
3939
)
4040
parser.add_argument(

packages/autorest.python/README.md

Lines changed: 2 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additio
2323

2424
#### Python code gen
2525

26-
```yaml !$(multiapiscript) && !$(multiclientscript)
26+
```yaml !$(multiclientscript)
2727
# default values for version tolerant and black
2828
black: true
2929
```
@@ -39,7 +39,7 @@ modelerfour:
3939
flatten-payloads: true
4040
```
4141
42-
```yaml !$(multiapiscript) && !$(multiclientscript)
42+
```yaml !$(multiclientscript)
4343
pass-thru:
4444
- model-deduplicator
4545
- subset-reducer
@@ -99,25 +99,6 @@ scope-codegen/emitter:
9999
output-artifact: python-files
100100
```
101101
102-
# Multiapi script pipeline
103-
104-
```yaml $(multiapiscript)
105-
pipeline:
106-
python/multiapiscript:
107-
scope: multiapiscript
108-
output-artifact: python-files
109-
110-
python/multiapiscript/emitter:
111-
input: multiapiscript
112-
scope: scope-multiapiscript/emitter
113-
114-
scope-multiapiscript/emitter:
115-
input-artifact: python-files
116-
output-uri-expr: $key
117-
118-
output-artifact: python-files
119-
```
120-
121102
# Black script pipeline
122103
123104
```yaml $(black)
@@ -173,12 +154,6 @@ help-content:
173154
- key: basic-setup-py
174155
description: Whether to generate a build script for setuptools to package your SDK. Defaults to `false`, generally not suggested if you are going to wrap the generated code
175156
type: bool
176-
- key: multiapi
177-
description: Whether to generate a multiapi client.
178-
type: bool
179-
- key: default-api
180-
description: In the case of `--multiapi`, you can override the default service API version with this flag. If not specified, we use the latest GA service version as the default API.
181-
type: string
182157
- key: no-namespace-folders
183158
description: Specify if you don't want pkgutil-style namespace folders. Defaults to `false`.
184159
type: bool

0 commit comments

Comments
 (0)