@typespec/http-client-python 0.7.1 → 0.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/emitter/code-model.d.ts.map +1 -1
- package/dist/emitter/code-model.js +6 -6
- package/dist/emitter/code-model.js.map +1 -1
- package/dist/emitter/emitter.d.ts.map +1 -1
- package/dist/emitter/emitter.js +57 -54
- package/dist/emitter/emitter.js.map +1 -1
- package/dist/emitter/external-process.js +3 -3
- package/dist/emitter/external-process.js.map +1 -1
- package/dist/emitter/http.d.ts.map +1 -1
- package/dist/emitter/http.js +81 -23
- package/dist/emitter/http.js.map +1 -1
- package/dist/emitter/lib.d.ts +37 -1
- package/dist/emitter/lib.d.ts.map +1 -1
- package/dist/emitter/lib.js +24 -0
- package/dist/emitter/lib.js.map +1 -1
- package/dist/emitter/types.js +5 -5
- package/dist/emitter/types.js.map +1 -1
- package/dist/emitter/utils.d.ts +4 -2
- package/dist/emitter/utils.d.ts.map +1 -1
- package/dist/emitter/utils.js +21 -2
- package/dist/emitter/utils.js.map +1 -1
- package/emitter/src/code-model.ts +14 -9
- package/emitter/src/emitter.ts +57 -53
- package/emitter/src/external-process.ts +3 -3
- package/emitter/src/http.ts +113 -26
- package/emitter/src/lib.ts +24 -0
- package/emitter/src/types.ts +5 -5
- package/emitter/src/utils.ts +36 -1
- package/emitter/temp/tsconfig.tsbuildinfo +1 -1
- package/eng/scripts/setup/__pycache__/venvtools.cpython-38.pyc +0 -0
- package/eng/scripts/setup/run_tsp.py +2 -2
- package/generator/build/lib/pygen/__init__.py +3 -3
- package/generator/build/lib/pygen/black.py +2 -2
- package/generator/build/lib/pygen/codegen/__init__.py +5 -5
- package/generator/build/lib/pygen/codegen/models/paging_operation.py +11 -2
- package/generator/build/lib/pygen/codegen/models/parameter.py +2 -1
- package/generator/build/lib/pygen/codegen/models/request_builder_parameter.py +2 -0
- package/generator/build/lib/pygen/codegen/models/response.py +1 -1
- package/generator/build/lib/pygen/codegen/serializers/builder_serializer.py +47 -25
- package/generator/build/lib/pygen/preprocess/__init__.py +10 -12
- package/generator/build/lib/pygen/preprocess/python_mappings.py +1 -1
- package/generator/build/lib/pygen/utils.py +5 -5
- package/generator/component-detection-pip-report.json +7 -6
- package/generator/dist/pygen-0.1.0-py3-none-any.whl +0 -0
- package/generator/pygen/__init__.py +3 -3
- package/generator/pygen/black.py +2 -2
- package/generator/pygen/codegen/__init__.py +5 -5
- package/generator/pygen/codegen/models/paging_operation.py +11 -2
- package/generator/pygen/codegen/models/parameter.py +2 -1
- package/generator/pygen/codegen/models/request_builder_parameter.py +2 -0
- package/generator/pygen/codegen/models/response.py +1 -1
- package/generator/pygen/codegen/serializers/builder_serializer.py +47 -25
- package/generator/pygen/preprocess/__init__.py +10 -12
- package/generator/pygen/preprocess/python_mappings.py +1 -1
- package/generator/pygen/utils.py +5 -5
- package/generator/test/azure/mock_api_tests/asynctests/test_azure_arm_operationtemplates_async.py +1 -0
- package/generator/test/azure/mock_api_tests/test_azure_arm_operationtemplates.py +1 -0
- package/generator/test/azure/tox.ini +2 -2
- package/generator/test/generic_mock_api_tests/asynctests/test_encode_bytes_async.py +4 -3
- package/generator/test/generic_mock_api_tests/asynctests/test_parameters_collection_format_async.py +0 -6
- package/generator/test/generic_mock_api_tests/asynctests/test_payload_pageable_async.py +75 -0
- package/generator/test/generic_mock_api_tests/asynctests/test_typetest_property_additionalproperties_async.py +1 -0
- package/generator/test/generic_mock_api_tests/test_encode_bytes.py +4 -3
- package/generator/test/generic_mock_api_tests/test_parameters_collection_format.py +0 -4
- package/generator/test/generic_mock_api_tests/test_payload_pageable.py +54 -0
- package/generator/test/generic_mock_api_tests/test_typetest_property_additionalproperties.py +1 -0
- package/generator/test/unbranded/tox.ini +2 -2
- package/package.json +24 -24
- package/generator/test/unbranded/mock_api_tests/cadl-ranch-config.yaml +0 -27
|
@@ -14,7 +14,7 @@ from .helpers import (
|
|
|
14
14
|
pad_builtin_namespaces,
|
|
15
15
|
pad_special_chars,
|
|
16
16
|
)
|
|
17
|
-
from .python_mappings import
|
|
17
|
+
from .python_mappings import TSP_RESERVED_WORDS, RESERVED_WORDS, PadType
|
|
18
18
|
|
|
19
19
|
from .. import YamlUpdatePlugin
|
|
20
20
|
from ..utils import (
|
|
@@ -182,11 +182,11 @@ class PreProcessPlugin(YamlUpdatePlugin):
|
|
|
182
182
|
|
|
183
183
|
@property
|
|
184
184
|
def models_mode(self) -> Optional[str]:
|
|
185
|
-
return self.options.get("models-mode", "dpg" if self.
|
|
185
|
+
return self.options.get("models-mode", "dpg" if self.is_tsp else None)
|
|
186
186
|
|
|
187
187
|
@property
|
|
188
|
-
def
|
|
189
|
-
return self.options.get("
|
|
188
|
+
def is_tsp(self) -> bool:
|
|
189
|
+
return self.options.get("tsp_file", False)
|
|
190
190
|
|
|
191
191
|
def add_body_param_type(
|
|
192
192
|
self,
|
|
@@ -197,9 +197,7 @@ class PreProcessPlugin(YamlUpdatePlugin):
|
|
|
197
197
|
if ( # pylint: disable=too-many-boolean-expressions
|
|
198
198
|
body_parameter
|
|
199
199
|
and body_parameter["type"]["type"] in ("model", "dict", "list")
|
|
200
|
-
and (
|
|
201
|
-
has_json_content_type(body_parameter) or (self.is_cadl and has_multi_part_content_type(body_parameter))
|
|
202
|
-
)
|
|
200
|
+
and (has_json_content_type(body_parameter) or (self.is_tsp and has_multi_part_content_type(body_parameter)))
|
|
203
201
|
and not body_parameter["type"].get("xmlMetadata")
|
|
204
202
|
and not any(t for t in ["flattened", "groupedBy"] if body_parameter.get(t))
|
|
205
203
|
):
|
|
@@ -210,7 +208,7 @@ class PreProcessPlugin(YamlUpdatePlugin):
|
|
|
210
208
|
"types": [body_parameter["type"]],
|
|
211
209
|
}
|
|
212
210
|
# don't add binary overload for multipart content type
|
|
213
|
-
if not (self.
|
|
211
|
+
if not (self.is_tsp and has_multi_part_content_type(body_parameter)):
|
|
214
212
|
body_parameter["type"]["types"].append(KNOWN_TYPES["binary"])
|
|
215
213
|
|
|
216
214
|
if origin_type == "model" and is_dpg_model and self.models_mode == "dpg":
|
|
@@ -223,8 +221,8 @@ class PreProcessPlugin(YamlUpdatePlugin):
|
|
|
223
221
|
# we'll pass in empty operation groups sometime etc.
|
|
224
222
|
return name
|
|
225
223
|
|
|
226
|
-
if self.
|
|
227
|
-
reserved_words = {k: (v +
|
|
224
|
+
if self.is_tsp:
|
|
225
|
+
reserved_words = {k: (v + TSP_RESERVED_WORDS.get(k, [])) for k, v in RESERVED_WORDS.items()}
|
|
228
226
|
else:
|
|
229
227
|
reserved_words = RESERVED_WORDS
|
|
230
228
|
name = pad_special_chars(name)
|
|
@@ -506,6 +504,6 @@ class PreProcessPlugin(YamlUpdatePlugin):
|
|
|
506
504
|
|
|
507
505
|
|
|
508
506
|
if __name__ == "__main__":
|
|
509
|
-
#
|
|
507
|
+
# TSP pipeline will call this
|
|
510
508
|
args, unknown_args = parse_args()
|
|
511
|
-
PreProcessPlugin(output_folder=args.output_folder,
|
|
509
|
+
PreProcessPlugin(output_folder=args.output_folder, tsp_file=args.tsp_file, **unknown_args).process()
|
package/generator/pygen/utils.py
CHANGED
|
@@ -44,7 +44,7 @@ def to_snake_case(name: str) -> str:
|
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
def parse_args(
|
|
47
|
-
|
|
47
|
+
need_tsp_file: bool = True,
|
|
48
48
|
) -> Tuple[argparse.Namespace, Dict[str, Any]]:
|
|
49
49
|
parser = argparse.ArgumentParser(
|
|
50
50
|
description="Run mypy against target folder. Add a local custom plugin to the path prior to execution. "
|
|
@@ -56,10 +56,10 @@ def parse_args(
|
|
|
56
56
|
required=True,
|
|
57
57
|
)
|
|
58
58
|
parser.add_argument(
|
|
59
|
-
"--
|
|
60
|
-
dest="
|
|
61
|
-
help="Serialized
|
|
62
|
-
required=
|
|
59
|
+
"--tsp-file",
|
|
60
|
+
dest="tsp_file",
|
|
61
|
+
help="Serialized tsp file",
|
|
62
|
+
required=need_tsp_file,
|
|
63
63
|
)
|
|
64
64
|
parser.add_argument(
|
|
65
65
|
"--debug",
|
|
@@ -10,7 +10,7 @@ commands =
|
|
|
10
10
|
pytest mock_api_tests ../generic_mock_api_tests
|
|
11
11
|
|
|
12
12
|
# pylint
|
|
13
|
-
pip install azure-pylint-guidelines-checker==0.5.
|
|
13
|
+
pip install azure-pylint-guidelines-checker==0.5.2 --index-url="https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-python/pypi/simple/"
|
|
14
14
|
python ../../../eng/scripts/ci/run_pylint.py -t azure -s "generated" {posargs}
|
|
15
15
|
|
|
16
16
|
# mypy
|
|
@@ -33,7 +33,7 @@ commands =
|
|
|
33
33
|
deps=
|
|
34
34
|
-r requirements.txt
|
|
35
35
|
commands =
|
|
36
|
-
pip install azure-pylint-guidelines-checker==0.5.
|
|
36
|
+
pip install azure-pylint-guidelines-checker==0.5.2 --index-url="https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-python/pypi/simple/"
|
|
37
37
|
python ../../../eng/scripts/ci/run_pylint.py -t azure -s "generated" {posargs}
|
|
38
38
|
|
|
39
39
|
[testenv:mypy]
|
|
@@ -107,7 +107,7 @@ def png_data() -> bytes:
|
|
|
107
107
|
@pytest.mark.asyncio
|
|
108
108
|
async def test_request_body(client: BytesClient, png_data: bytes):
|
|
109
109
|
await client.request_body.default(
|
|
110
|
-
value=
|
|
110
|
+
value=png_data,
|
|
111
111
|
)
|
|
112
112
|
await client.request_body.octet_stream(
|
|
113
113
|
value=png_data,
|
|
@@ -126,8 +126,9 @@ async def test_request_body(client: BytesClient, png_data: bytes):
|
|
|
126
126
|
@pytest.mark.asyncio
|
|
127
127
|
async def test_response_body(client: BytesClient, png_data: bytes):
|
|
128
128
|
expected = b"test"
|
|
129
|
-
assert
|
|
129
|
+
assert b"".join([d async for d in (await client.response_body.default())]) == png_data
|
|
130
130
|
assert expected == await client.response_body.base64()
|
|
131
|
-
assert expected == await client.response_body.base64_url()
|
|
132
131
|
assert b"".join([d async for d in (await client.response_body.octet_stream())]) == png_data
|
|
133
132
|
assert b"".join([d async for d in (await client.response_body.custom_content_type())]) == png_data
|
|
133
|
+
# will reopen after TCGC release a fix version for https://github.com/Azure/typespec-azure/pull/2411
|
|
134
|
+
# assert expected == await client.response_body.base64_url()
|
package/generator/test/generic_mock_api_tests/asynctests/test_parameters_collection_format_async.py
CHANGED
|
@@ -33,12 +33,6 @@ async def test_query_ssv(client: CollectionFormatClient):
|
|
|
33
33
|
await client.query.ssv(colors=["blue", "red", "green"])
|
|
34
34
|
|
|
35
35
|
|
|
36
|
-
@pytest.mark.asyncio
|
|
37
|
-
@pytest.mark.skip(reason="https://github.com/aio-libs/aiohttp/issues/5904")
|
|
38
|
-
async def test_query_tsv(client: CollectionFormatClient):
|
|
39
|
-
await client.query.tsv(colors=["blue", "red", "green"])
|
|
40
|
-
|
|
41
|
-
|
|
42
36
|
@pytest.mark.asyncio
|
|
43
37
|
async def test_csv_header(client: CollectionFormatClient):
|
|
44
38
|
await client.header.csv(colors=["blue", "red", "green"])
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# -------------------------------------------------------------------------
|
|
2
|
+
# Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
# Licensed under the MIT License. See License.txt in the project root for
|
|
4
|
+
# license information.
|
|
5
|
+
# --------------------------------------------------------------------------
|
|
6
|
+
import pytest
|
|
7
|
+
from payload.pageable.aio import PageableClient
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
@pytest.fixture
|
|
11
|
+
async def client():
|
|
12
|
+
async with PageableClient(endpoint="http://localhost:3000") as client:
|
|
13
|
+
yield client
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def assert_result(result):
|
|
17
|
+
assert len(result) == 4
|
|
18
|
+
assert result[0].id == "1"
|
|
19
|
+
assert result[1].id == "2"
|
|
20
|
+
assert result[2].id == "3"
|
|
21
|
+
assert result[3].id == "4"
|
|
22
|
+
assert result[0].name == "dog"
|
|
23
|
+
assert result[1].name == "cat"
|
|
24
|
+
assert result[2].name == "bird"
|
|
25
|
+
assert result[3].name == "fish"
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
@pytest.mark.asyncio
|
|
29
|
+
async def test_link(client: PageableClient):
|
|
30
|
+
result = [p async for p in client.server_driven_pagination.link()]
|
|
31
|
+
assert_result(result)
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
@pytest.mark.asyncio
|
|
35
|
+
async def test_request_query_response_body(client: PageableClient):
|
|
36
|
+
result = [
|
|
37
|
+
p
|
|
38
|
+
async for p in client.server_driven_pagination.continuation_token.request_query_response_body(
|
|
39
|
+
foo="foo", bar="bar"
|
|
40
|
+
)
|
|
41
|
+
]
|
|
42
|
+
assert_result(result)
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
@pytest.mark.asyncio
|
|
46
|
+
async def test_request_header_response_body(client: PageableClient):
|
|
47
|
+
result = [
|
|
48
|
+
p
|
|
49
|
+
async for p in client.server_driven_pagination.continuation_token.request_header_response_body(
|
|
50
|
+
foo="foo", bar="bar"
|
|
51
|
+
)
|
|
52
|
+
]
|
|
53
|
+
assert_result(result)
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
@pytest.mark.asyncio
|
|
57
|
+
async def test_request_query_response_header(client: PageableClient):
|
|
58
|
+
result = [
|
|
59
|
+
p
|
|
60
|
+
async for p in client.server_driven_pagination.continuation_token.request_query_response_header(
|
|
61
|
+
foo="foo", bar="bar"
|
|
62
|
+
)
|
|
63
|
+
]
|
|
64
|
+
assert_result(result)
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
@pytest.mark.asyncio
|
|
68
|
+
async def test_request_header_response_header(client: PageableClient):
|
|
69
|
+
result = [
|
|
70
|
+
p
|
|
71
|
+
async for p in client.server_driven_pagination.continuation_token.request_query_response_header(
|
|
72
|
+
foo="foo", bar="bar"
|
|
73
|
+
)
|
|
74
|
+
]
|
|
75
|
+
assert_result(result)
|
|
@@ -262,6 +262,7 @@ async def test_spread_model_array(client: AdditionalPropertiesClient):
|
|
|
262
262
|
await client.spread_model_array.put(body)
|
|
263
263
|
|
|
264
264
|
|
|
265
|
+
@pytest.mark.skip(reason="https://github.com/microsoft/typespec/pull/6425")
|
|
265
266
|
@pytest.mark.asyncio
|
|
266
267
|
async def test_spread_record_discriminated_union(client: AdditionalPropertiesClient):
|
|
267
268
|
body = {
|
|
@@ -103,7 +103,7 @@ def png_data() -> bytes:
|
|
|
103
103
|
|
|
104
104
|
def test_request_body(client: BytesClient, png_data: bytes):
|
|
105
105
|
client.request_body.default(
|
|
106
|
-
value=
|
|
106
|
+
value=png_data,
|
|
107
107
|
)
|
|
108
108
|
client.request_body.octet_stream(
|
|
109
109
|
value=png_data,
|
|
@@ -121,8 +121,9 @@ def test_request_body(client: BytesClient, png_data: bytes):
|
|
|
121
121
|
|
|
122
122
|
def test_response_body(client: BytesClient, png_data: bytes):
|
|
123
123
|
expected = b"test"
|
|
124
|
-
assert
|
|
124
|
+
assert b"".join(client.response_body.default()) == png_data
|
|
125
125
|
assert expected == client.response_body.base64()
|
|
126
|
-
assert expected == client.response_body.base64_url()
|
|
127
126
|
assert b"".join(client.response_body.octet_stream()) == png_data
|
|
128
127
|
assert b"".join(client.response_body.custom_content_type()) == png_data
|
|
128
|
+
# will reopen after TCGC release a fix version for https://github.com/Azure/typespec-azure/pull/2411
|
|
129
|
+
# assert expected == client.response_body.base64_url()
|
|
@@ -29,9 +29,5 @@ def test_query_ssv(client: CollectionFormatClient):
|
|
|
29
29
|
client.query.ssv(colors=["blue", "red", "green"])
|
|
30
30
|
|
|
31
31
|
|
|
32
|
-
def test_query_tsv(client: CollectionFormatClient):
|
|
33
|
-
client.query.tsv(colors=["blue", "red", "green"])
|
|
34
|
-
|
|
35
|
-
|
|
36
32
|
def test_csv_header(client: CollectionFormatClient):
|
|
37
33
|
client.header.csv(colors=["blue", "red", "green"])
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# -------------------------------------------------------------------------
|
|
2
|
+
# Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
# Licensed under the MIT License. See License.txt in the project root for
|
|
4
|
+
# license information.
|
|
5
|
+
# --------------------------------------------------------------------------
|
|
6
|
+
import pytest
|
|
7
|
+
from payload.pageable import PageableClient
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
@pytest.fixture
|
|
11
|
+
def client():
|
|
12
|
+
with PageableClient(endpoint="http://localhost:3000") as client:
|
|
13
|
+
yield client
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def assert_result(result):
|
|
17
|
+
assert len(result) == 4
|
|
18
|
+
assert result[0].id == "1"
|
|
19
|
+
assert result[1].id == "2"
|
|
20
|
+
assert result[2].id == "3"
|
|
21
|
+
assert result[3].id == "4"
|
|
22
|
+
assert result[0].name == "dog"
|
|
23
|
+
assert result[1].name == "cat"
|
|
24
|
+
assert result[2].name == "bird"
|
|
25
|
+
assert result[3].name == "fish"
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
def test_link(client: PageableClient):
|
|
29
|
+
result = list(client.server_driven_pagination.link())
|
|
30
|
+
assert_result(result)
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
def test_request_query_response_body(client: PageableClient):
|
|
34
|
+
result = list(client.server_driven_pagination.continuation_token.request_query_response_body(foo="foo", bar="bar"))
|
|
35
|
+
assert_result(result)
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
def test_request_header_response_body(client: PageableClient):
|
|
39
|
+
result = list(client.server_driven_pagination.continuation_token.request_header_response_body(foo="foo", bar="bar"))
|
|
40
|
+
assert_result(result)
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
def test_request_query_response_header(client: PageableClient):
|
|
44
|
+
result = list(
|
|
45
|
+
client.server_driven_pagination.continuation_token.request_query_response_header(foo="foo", bar="bar")
|
|
46
|
+
)
|
|
47
|
+
assert_result(result)
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
def test_request_header_response_header(client: PageableClient):
|
|
51
|
+
result = list(
|
|
52
|
+
client.server_driven_pagination.continuation_token.request_header_response_header(foo="foo", bar="bar")
|
|
53
|
+
)
|
|
54
|
+
assert_result(result)
|
package/generator/test/generic_mock_api_tests/test_typetest_property_additionalproperties.py
CHANGED
|
@@ -236,6 +236,7 @@ def test_spread_model_array(client: AdditionalPropertiesClient):
|
|
|
236
236
|
client.spread_model_array.put(body)
|
|
237
237
|
|
|
238
238
|
|
|
239
|
+
@pytest.mark.skip(reason="https://github.com/microsoft/typespec/pull/6425")
|
|
239
240
|
def test_spread_record_discriminated_union(client: AdditionalPropertiesClient):
|
|
240
241
|
body = {
|
|
241
242
|
"name": "abc",
|
|
@@ -10,7 +10,7 @@ commands =
|
|
|
10
10
|
pytest mock_api_tests ../generic_mock_api_tests
|
|
11
11
|
|
|
12
12
|
# pylint
|
|
13
|
-
pip install azure-pylint-guidelines-checker==0.5.
|
|
13
|
+
pip install azure-pylint-guidelines-checker==0.5.2 --index-url="https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-python/pypi/simple/"
|
|
14
14
|
python ../../../eng/scripts/ci/run_pylint.py -t unbranded -s "generated" {posargs}
|
|
15
15
|
|
|
16
16
|
# mypy
|
|
@@ -33,7 +33,7 @@ commands =
|
|
|
33
33
|
deps=
|
|
34
34
|
-r requirements.txt
|
|
35
35
|
commands =
|
|
36
|
-
pip install azure-pylint-guidelines-checker==0.5.
|
|
36
|
+
pip install azure-pylint-guidelines-checker==0.5.2 --index-url="https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-python/pypi/simple/"
|
|
37
37
|
python ../../../eng/scripts/ci/run_pylint.py -t unbranded -s "generated" {posargs}
|
|
38
38
|
|
|
39
39
|
[testenv:mypy]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@typespec/http-client-python",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.1",
|
|
4
4
|
"author": "Microsoft Corporation",
|
|
5
5
|
"description": "TypeSpec emitter for Python SDKs",
|
|
6
6
|
"homepage": "https://typespec.io",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"clean": "rimraf ./dist ./temp ./emitter/temp ./generator/test/azure/generated ./generator/test/unbranded/generated ./venv",
|
|
33
33
|
"build": "tsc -p ./emitter/tsconfig.build.json && tsx ./eng/scripts/setup/build.ts",
|
|
34
34
|
"watch": "tsc -p ./emitter/tsconfig.build.json --watch",
|
|
35
|
-
"lint": "eslint
|
|
35
|
+
"lint": "eslint emitter/ --max-warnings=0",
|
|
36
36
|
"lint:py": "tsx ./eng/scripts/ci/lint.ts --folderName generator/pygen",
|
|
37
37
|
"format": "pnpm -w format:dir packages/http-client-python && tsx ./eng/scripts/ci/format.ts",
|
|
38
38
|
"install": "tsx ./eng/scripts/setup/install.ts",
|
|
@@ -53,16 +53,16 @@
|
|
|
53
53
|
"emitter"
|
|
54
54
|
],
|
|
55
55
|
"peerDependencies": {
|
|
56
|
-
"@azure-tools/typespec-autorest": ">=0.
|
|
57
|
-
"@azure-tools/typespec-azure-core": ">=0.
|
|
58
|
-
"@azure-tools/typespec-azure-resource-manager": ">=0.
|
|
59
|
-
"@azure-tools/typespec-azure-rulesets": ">=0.
|
|
60
|
-
"@azure-tools/typespec-client-generator-core": ">=0.
|
|
61
|
-
"@typespec/compiler": ">=0.
|
|
62
|
-
"@typespec/http": ">=0.
|
|
63
|
-
"@typespec/openapi": ">=0.
|
|
64
|
-
"@typespec/rest": ">=0.
|
|
65
|
-
"@typespec/versioning": ">=0.
|
|
56
|
+
"@azure-tools/typespec-autorest": ">=0.53.0 <1.0.0",
|
|
57
|
+
"@azure-tools/typespec-azure-core": ">=0.53.0 <1.0.0",
|
|
58
|
+
"@azure-tools/typespec-azure-resource-manager": ">=0.53.0 <1.0.0",
|
|
59
|
+
"@azure-tools/typespec-azure-rulesets": ">=0.53.0 <3.0.0",
|
|
60
|
+
"@azure-tools/typespec-client-generator-core": ">=0.53.0 <1.0.0",
|
|
61
|
+
"@typespec/compiler": ">=0.67.0 <1.0.0",
|
|
62
|
+
"@typespec/http": ">=0.67.0 <1.0.0",
|
|
63
|
+
"@typespec/openapi": ">=0.67.0 <1.0.0",
|
|
64
|
+
"@typespec/rest": ">=0.67.0 <1.0.0",
|
|
65
|
+
"@typespec/versioning": ">=0.67.0 <1.0.0"
|
|
66
66
|
},
|
|
67
67
|
"dependencies": {
|
|
68
68
|
"js-yaml": "~4.1.0",
|
|
@@ -72,21 +72,21 @@
|
|
|
72
72
|
"tsx": "~4.19.1"
|
|
73
73
|
},
|
|
74
74
|
"devDependencies": {
|
|
75
|
-
"@azure-tools/azure-http-specs": "0.1.0-alpha.
|
|
76
|
-
"@azure-tools/typespec-autorest": "~0.
|
|
77
|
-
"@azure-tools/typespec-azure-core": "~0.
|
|
78
|
-
"@azure-tools/typespec-azure-resource-manager": "~0.
|
|
79
|
-
"@azure-tools/typespec-azure-rulesets": "~0.
|
|
80
|
-
"@azure-tools/typespec-client-generator-core": "~0.
|
|
75
|
+
"@azure-tools/azure-http-specs": "0.1.0-alpha.10",
|
|
76
|
+
"@azure-tools/typespec-autorest": "~0.53.0",
|
|
77
|
+
"@azure-tools/typespec-azure-core": "~0.53.0",
|
|
78
|
+
"@azure-tools/typespec-azure-resource-manager": "~0.53.0",
|
|
79
|
+
"@azure-tools/typespec-azure-rulesets": "~0.53.0",
|
|
80
|
+
"@azure-tools/typespec-client-generator-core": "~0.53.0",
|
|
81
81
|
"@types/js-yaml": "~4.0.5",
|
|
82
82
|
"@types/node": "~22.5.4",
|
|
83
83
|
"@types/semver": "7.5.8",
|
|
84
|
-
"@typespec/compiler": "~0.
|
|
85
|
-
"@typespec/http": "~0.
|
|
86
|
-
"@typespec/http-specs": "0.1.0-alpha.
|
|
87
|
-
"@typespec/openapi": "~0.
|
|
88
|
-
"@typespec/rest": "~0.
|
|
89
|
-
"@typespec/versioning": "~0.
|
|
84
|
+
"@typespec/compiler": "~0.67.0",
|
|
85
|
+
"@typespec/http": "~0.67.0",
|
|
86
|
+
"@typespec/http-specs": "0.1.0-alpha.15-dev.3",
|
|
87
|
+
"@typespec/openapi": "~0.67.0",
|
|
88
|
+
"@typespec/rest": "~0.67.0",
|
|
89
|
+
"@typespec/versioning": "~0.67.0",
|
|
90
90
|
"c8": "^10.1.3",
|
|
91
91
|
"chalk": "5.3.0",
|
|
92
92
|
"rimraf": "~6.0.1",
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
unsupportedScenarios: Azure_ClientGenerator_Core_Access_InternalOperation
|
|
2
|
-
Azure_ClientGenerator_Core_Access_PublicOperation
|
|
3
|
-
Azure_ClientGenerator_Core_Access_RelativeModelInOperation
|
|
4
|
-
Azure_ClientGenerator_Core_Access_SharedModelInOperation
|
|
5
|
-
Azure_ClientGenerator_Core_Usage_ModelInOperation
|
|
6
|
-
Azure_Core_Basic_createOrReplace
|
|
7
|
-
Azure_Core_Basic_createOrUpdate
|
|
8
|
-
Azure_Core_Basic_delete
|
|
9
|
-
Azure_Core_Basic_export
|
|
10
|
-
Azure_Core_Basic_get
|
|
11
|
-
Azure_Core_Basic_list
|
|
12
|
-
Azure_Core_Basic_listWithCustomPageModel
|
|
13
|
-
Azure_Core_Basic_listWithPage
|
|
14
|
-
Azure_Core_Basic_listWithParameters
|
|
15
|
-
Azure_Core_Basic_TwoModelsAsPageItem
|
|
16
|
-
Azure_Core_Lro_Rpc_longRunningRpc
|
|
17
|
-
Azure_Core_Lro_Standard_createOrReplace
|
|
18
|
-
Azure_Core_Lro_Standard_delete
|
|
19
|
-
Azure_Core_Lro_Standard_export
|
|
20
|
-
Azure_Core_Scalar_AzureLocationScalar_get
|
|
21
|
-
Azure_Core_Scalar_AzureLocationScalar_header
|
|
22
|
-
Azure_Core_Scalar_AzureLocationScalar_post
|
|
23
|
-
Azure_Core_Scalar_AzureLocationScalar_put
|
|
24
|
-
Azure_Core_Scalar_AzureLocationScalar_query
|
|
25
|
-
Azure_Core_Traits_repeatableAction
|
|
26
|
-
Azure_Core_Traits_smokeTest
|
|
27
|
-
Azure_SpecialHeaders_XmsClientRequestId
|