Skip to content

Commit 36dbecc

Browse files
committed
Merge branch 'main' into fix-component-schema-naming-bug
2 parents 4dbee47 + 59a5827 commit 36dbecc

File tree

63 files changed

+319
-299
lines changed

Some content is hidden

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

63 files changed

+319
-299
lines changed

.github/dependabot.yml

-7
This file was deleted.

.github/renovate.json

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"extends": [
3+
"config:base"
4+
]
5+
}

.github/workflows/checks.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
steps:
1919
- uses: actions/checkout@v2
2020
- name: Set up Python
21-
uses: actions/setup-python@v1
21+
uses: actions/setup-python@v2
2222
with:
2323
python-version: ${{ matrix.python }}
2424
- name: Cache dependencies

.github/workflows/pythonpublish.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
steps:
1111
- uses: actions/checkout@v2
1212
- name: Set up Python
13-
uses: actions/setup-python@v1
13+
uses: actions/setup-python@v2
1414
with:
1515
python-version: '3.x'
1616
- name: Install dependencies

end_to_end_tests/golden-record/my_test_api_client/api/tests/defaults_tests_defaults_post.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ def sync(
222222
nullable_model_prop: Union[Unset, None, ModelWithUnionProperty] = UNSET,
223223
nullable_required_model_prop: Optional[ModelWithUnionProperty],
224224
) -> Optional[Union[HTTPValidationError, None]]:
225-
""" """
225+
""" """
226226

227227
return sync_detailed(
228228
client=client,
@@ -315,7 +315,7 @@ async def asyncio(
315315
nullable_model_prop: Union[Unset, None, ModelWithUnionProperty] = UNSET,
316316
nullable_required_model_prop: Optional[ModelWithUnionProperty],
317317
) -> Optional[Union[HTTPValidationError, None]]:
318-
""" """
318+
""" """
319319

320320
return (
321321
await asyncio_detailed(

end_to_end_tests/golden-record/my_test_api_client/api/tests/get_basic_list_of_booleans.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def sync(
5959
*,
6060
client: Client,
6161
) -> Optional[List[bool]]:
62-
""" Get a list of booleans """
62+
"""Get a list of booleans"""
6363

6464
return sync_detailed(
6565
client=client,
@@ -84,7 +84,7 @@ async def asyncio(
8484
*,
8585
client: Client,
8686
) -> Optional[List[bool]]:
87-
""" Get a list of booleans """
87+
"""Get a list of booleans"""
8888

8989
return (
9090
await asyncio_detailed(

end_to_end_tests/golden-record/my_test_api_client/api/tests/get_basic_list_of_floats.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def sync(
5959
*,
6060
client: Client,
6161
) -> Optional[List[float]]:
62-
""" Get a list of floats """
62+
"""Get a list of floats"""
6363

6464
return sync_detailed(
6565
client=client,
@@ -84,7 +84,7 @@ async def asyncio(
8484
*,
8585
client: Client,
8686
) -> Optional[List[float]]:
87-
""" Get a list of floats """
87+
"""Get a list of floats"""
8888

8989
return (
9090
await asyncio_detailed(

end_to_end_tests/golden-record/my_test_api_client/api/tests/get_basic_list_of_integers.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def sync(
5959
*,
6060
client: Client,
6161
) -> Optional[List[int]]:
62-
""" Get a list of integers """
62+
"""Get a list of integers"""
6363

6464
return sync_detailed(
6565
client=client,
@@ -84,7 +84,7 @@ async def asyncio(
8484
*,
8585
client: Client,
8686
) -> Optional[List[int]]:
87-
""" Get a list of integers """
87+
"""Get a list of integers"""
8888

8989
return (
9090
await asyncio_detailed(

end_to_end_tests/golden-record/my_test_api_client/api/tests/get_basic_list_of_strings.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def sync(
5959
*,
6060
client: Client,
6161
) -> Optional[List[str]]:
62-
""" Get a list of strings """
62+
"""Get a list of strings"""
6363

6464
return sync_detailed(
6565
client=client,
@@ -84,7 +84,7 @@ async def asyncio(
8484
*,
8585
client: Client,
8686
) -> Optional[List[str]]:
87-
""" Get a list of strings """
87+
"""Get a list of strings"""
8888

8989
return (
9090
await asyncio_detailed(

end_to_end_tests/golden-record/my_test_api_client/api/tests/get_user_list.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def sync(
102102
an_enum_value: List[AnEnum],
103103
some_date: Union[datetime.date, datetime.datetime],
104104
) -> Optional[Union[HTTPValidationError, List[AModel]]]:
105-
""" Get a list of things """
105+
"""Get a list of things"""
106106

107107
return sync_detailed(
108108
client=client,
@@ -135,7 +135,7 @@ async def asyncio(
135135
an_enum_value: List[AnEnum],
136136
some_date: Union[datetime.date, datetime.datetime],
137137
) -> Optional[Union[HTTPValidationError, List[AModel]]]:
138-
""" Get a list of things """
138+
"""Get a list of things"""
139139

140140
return (
141141
await asyncio_detailed(

end_to_end_tests/golden-record/my_test_api_client/api/tests/int_enum_tests_int_enum_post.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def sync(
7777
client: Client,
7878
int_enum: AnIntEnum,
7979
) -> Optional[Union[HTTPValidationError, None]]:
80-
""" """
80+
""" """
8181

8282
return sync_detailed(
8383
client=client,
@@ -106,7 +106,7 @@ async def asyncio(
106106
client: Client,
107107
int_enum: AnIntEnum,
108108
) -> Optional[Union[HTTPValidationError, None]]:
109-
""" """
109+
""" """
110110

111111
return (
112112
await asyncio_detailed(

end_to_end_tests/golden-record/my_test_api_client/api/tests/json_body_tests_json_body_post.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ def sync(
7272
client: Client,
7373
json_body: AModel,
7474
) -> Optional[Union[HTTPValidationError, None]]:
75-
""" Try sending a JSON body """
75+
"""Try sending a JSON body"""
7676

7777
return sync_detailed(
7878
client=client,
@@ -101,7 +101,7 @@ async def asyncio(
101101
client: Client,
102102
json_body: AModel,
103103
) -> Optional[Union[HTTPValidationError, None]]:
104-
""" Try sending a JSON body """
104+
"""Try sending a JSON body"""
105105

106106
return (
107107
await asyncio_detailed(

end_to_end_tests/golden-record/my_test_api_client/api/tests/octet_stream_tests_octet_stream_get.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def sync(
6060
*,
6161
client: Client,
6262
) -> Optional[File]:
63-
""" """
63+
""" """
6464

6565
return sync_detailed(
6666
client=client,
@@ -85,7 +85,7 @@ async def asyncio(
8585
*,
8686
client: Client,
8787
) -> Optional[File]:
88-
""" """
88+
""" """
8989

9090
return (
9191
await asyncio_detailed(

end_to_end_tests/golden-record/my_test_api_client/api/tests/optional_value_tests_optional_query_param.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def sync(
7878
client: Client,
7979
query_param: Union[Unset, List[str]] = UNSET,
8080
) -> Optional[Union[HTTPValidationError, None]]:
81-
""" Test optional query parameters """
81+
"""Test optional query parameters"""
8282

8383
return sync_detailed(
8484
client=client,
@@ -107,7 +107,7 @@ async def asyncio(
107107
client: Client,
108108
query_param: Union[Unset, List[str]] = UNSET,
109109
) -> Optional[Union[HTTPValidationError, None]]:
110-
""" Test optional query parameters """
110+
"""Test optional query parameters"""
111111

112112
return (
113113
await asyncio_detailed(

end_to_end_tests/golden-record/my_test_api_client/api/tests/test_inline_objects.py

+10-10
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
from ...client import Client
66
from ...models.test_inline_objects_json_body import TestInlineObjectsJsonBody
7-
from ...models.test_inline_objects_response_200 import TestInlineObjectsResponse_200
7+
from ...models.test_inline_objects_response_200 import TestInlineObjectsResponse200
88
from ...types import Response
99

1010

@@ -29,15 +29,15 @@ def _get_kwargs(
2929
}
3030

3131

32-
def _parse_response(*, response: httpx.Response) -> Optional[TestInlineObjectsResponse_200]:
32+
def _parse_response(*, response: httpx.Response) -> Optional[TestInlineObjectsResponse200]:
3333
if response.status_code == 200:
34-
response_200 = TestInlineObjectsResponse_200.from_dict(response.json())
34+
response_200 = TestInlineObjectsResponse200.from_dict(response.json())
3535

3636
return response_200
3737
return None
3838

3939

40-
def _build_response(*, response: httpx.Response) -> Response[TestInlineObjectsResponse_200]:
40+
def _build_response(*, response: httpx.Response) -> Response[TestInlineObjectsResponse200]:
4141
return Response(
4242
status_code=response.status_code,
4343
content=response.content,
@@ -50,7 +50,7 @@ def sync_detailed(
5050
*,
5151
client: Client,
5252
json_body: TestInlineObjectsJsonBody,
53-
) -> Response[TestInlineObjectsResponse_200]:
53+
) -> Response[TestInlineObjectsResponse200]:
5454
kwargs = _get_kwargs(
5555
client=client,
5656
json_body=json_body,
@@ -67,8 +67,8 @@ def sync(
6767
*,
6868
client: Client,
6969
json_body: TestInlineObjectsJsonBody,
70-
) -> Optional[TestInlineObjectsResponse_200]:
71-
""" """
70+
) -> Optional[TestInlineObjectsResponse200]:
71+
""" """
7272

7373
return sync_detailed(
7474
client=client,
@@ -80,7 +80,7 @@ async def asyncio_detailed(
8080
*,
8181
client: Client,
8282
json_body: TestInlineObjectsJsonBody,
83-
) -> Response[TestInlineObjectsResponse_200]:
83+
) -> Response[TestInlineObjectsResponse200]:
8484
kwargs = _get_kwargs(
8585
client=client,
8686
json_body=json_body,
@@ -96,8 +96,8 @@ async def asyncio(
9696
*,
9797
client: Client,
9898
json_body: TestInlineObjectsJsonBody,
99-
) -> Optional[TestInlineObjectsResponse_200]:
100-
""" """
99+
) -> Optional[TestInlineObjectsResponse200]:
100+
""" """
101101

102102
return (
103103
await asyncio_detailed(

end_to_end_tests/golden-record/my_test_api_client/api/tests/upload_file_tests_upload_post.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def sync(
8686
multipart_data: BodyUploadFileTestsUploadPost,
8787
keep_alive: Union[Unset, bool] = UNSET,
8888
) -> Optional[Union[HTTPValidationError, None]]:
89-
""" Upload a file """
89+
"""Upload a file"""
9090

9191
return sync_detailed(
9292
client=client,
@@ -119,7 +119,7 @@ async def asyncio(
119119
multipart_data: BodyUploadFileTestsUploadPost,
120120
keep_alive: Union[Unset, bool] = UNSET,
121121
) -> Optional[Union[HTTPValidationError, None]]:
122-
""" Upload a file """
122+
"""Upload a file"""
123123

124124
return (
125125
await asyncio_detailed(

end_to_end_tests/golden-record/my_test_api_client/client.py

+7-7
Original file line numberDiff line numberDiff line change
@@ -5,42 +5,42 @@
55

66
@attr.s(auto_attribs=True)
77
class Client:
8-
""" A class for keeping track of data related to the API """
8+
"""A class for keeping track of data related to the API"""
99

1010
base_url: str
1111
cookies: Dict[str, str] = attr.ib(factory=dict, kw_only=True)
1212
headers: Dict[str, str] = attr.ib(factory=dict, kw_only=True)
1313
timeout: float = attr.ib(5.0, kw_only=True)
1414

1515
def get_headers(self) -> Dict[str, str]:
16-
""" Get headers to be used in all endpoints """
16+
"""Get headers to be used in all endpoints"""
1717
return {**self.headers}
1818

1919
def with_headers(self, headers: Dict[str, str]) -> "Client":
20-
""" Get a new client matching this one with additional headers """
20+
"""Get a new client matching this one with additional headers"""
2121
return attr.evolve(self, headers={**self.headers, **headers})
2222

2323
def get_cookies(self) -> Dict[str, str]:
2424
return {**self.cookies}
2525

2626
def with_cookies(self, cookies: Dict[str, str]) -> "Client":
27-
""" Get a new client matching this one with additional cookies """
27+
"""Get a new client matching this one with additional cookies"""
2828
return attr.evolve(self, cookies={**self.cookies, **cookies})
2929

3030
def get_timeout(self) -> float:
3131
return self.timeout
3232

3333
def with_timeout(self, timeout: float) -> "Client":
34-
""" Get a new client matching this one with a new timeout (in seconds) """
34+
"""Get a new client matching this one with a new timeout (in seconds)"""
3535
return attr.evolve(self, timeout=timeout)
3636

3737

3838
@attr.s(auto_attribs=True)
3939
class AuthenticatedClient(Client):
40-
""" A Client which has been authenticated for use on secured endpoints """
40+
"""A Client which has been authenticated for use on secured endpoints"""
4141

4242
token: str
4343

4444
def get_headers(self) -> Dict[str, str]:
45-
""" Get headers to be used in authenticated endpoints """
45+
"""Get headers to be used in authenticated endpoints"""
4646
return {"Authorization": f"Bearer {self.token}", **self.headers}

end_to_end_tests/golden-record/my_test_api_client/models/__init__.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@
1818
from .model_with_additional_properties_inlined import ModelWithAdditionalPropertiesInlined
1919
from .model_with_additional_properties_refed import ModelWithAdditionalPropertiesRefed
2020
from .model_with_any_json_properties import ModelWithAnyJsonProperties
21-
from .model_with_any_json_properties_additional_property_type0 import ModelWithAnyJsonPropertiesAdditionalPropertyType0
21+
from .model_with_any_json_properties_additional_property_type_0 import ModelWithAnyJsonPropertiesAdditionalPropertyType0
2222
from .model_with_primitive_additional_properties import ModelWithPrimitiveAdditionalProperties
2323
from .model_with_primitive_additional_properties_a_date_holder import ModelWithPrimitiveAdditionalPropertiesADateHolder
2424
from .model_with_property_ref import ModelWithPropertyRef
2525
from .model_with_union_property import ModelWithUnionProperty
2626
from .model_with_union_property_inlined import ModelWithUnionPropertyInlined
27-
from .model_with_union_property_inlined_fruit_type0 import ModelWithUnionPropertyInlinedFruitType0
28-
from .model_with_union_property_inlined_fruit_type1 import ModelWithUnionPropertyInlinedFruitType1
27+
from .model_with_union_property_inlined_fruit_type_0 import ModelWithUnionPropertyInlinedFruitType0
28+
from .model_with_union_property_inlined_fruit_type_1 import ModelWithUnionPropertyInlinedFruitType1
2929
from .test_inline_objects_json_body import TestInlineObjectsJsonBody
30-
from .test_inline_objects_response_200 import TestInlineObjectsResponse_200
30+
from .test_inline_objects_response_200 import TestInlineObjectsResponse200
3131
from .validation_error import ValidationError

0 commit comments

Comments
 (0)