Skip to content
This repository was archived by the owner on Dec 25, 2024. It is now read-only.

Commit 3e0acc3

Browse files
authored
Fixes response header bug (#106)
* Adds new endpoint * Fixes non-default argument follows default argument error * Reverts spec * Removes other endpoint files * Reverts file * Regen
1 parent 6be08f8 commit 3e0acc3

File tree

4 files changed

+16
-16
lines changed

4 files changed

+16
-16
lines changed

modules/openapi-json-schema-generator/src/main/resources/python/api_client.handlebars

+4-4
Original file line numberDiff line numberDiff line change
@@ -796,14 +796,14 @@ class MediaType:
796796
@dataclass
797797
class ApiResponse:
798798
response: urllib3.HTTPResponse
799-
body: typing.Union[Unset, Schema]
800-
headers: typing.Union[Unset, typing.List[HeaderParameter]]
799+
body: typing.Union[Unset, Schema] = unset
800+
headers: typing.Union[Unset, typing.Dict[str, Schema]] = unset
801801

802802
def __init__(
803803
self,
804804
response: urllib3.HTTPResponse,
805-
body: typing.Union[Unset, typing.Type[Schema]],
806-
headers: typing.Union[Unset, typing.List[HeaderParameter]]
805+
body: typing.Union[Unset, Schema] = unset,
806+
headers: typing.Union[Unset, typing.Dict[str, Schema]] = unset
807807
):
808808
"""
809809
pycharm needs this to prevent 'Unexpected argument' warnings

samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/api_client.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -800,14 +800,14 @@ class MediaType:
800800
@dataclass
801801
class ApiResponse:
802802
response: urllib3.HTTPResponse
803-
body: typing.Union[Unset, Schema]
804-
headers: typing.Union[Unset, typing.List[HeaderParameter]]
803+
body: typing.Union[Unset, Schema] = unset
804+
headers: typing.Union[Unset, typing.Dict[str, Schema]] = unset
805805

806806
def __init__(
807807
self,
808808
response: urllib3.HTTPResponse,
809-
body: typing.Union[Unset, typing.Type[Schema]],
810-
headers: typing.Union[Unset, typing.List[HeaderParameter]]
809+
body: typing.Union[Unset, Schema] = unset,
810+
headers: typing.Union[Unset, typing.Dict[str, Schema]] = unset
811811
):
812812
"""
813813
pycharm needs this to prevent 'Unexpected argument' warnings

samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/this_package/api_client.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -800,14 +800,14 @@ class MediaType:
800800
@dataclass
801801
class ApiResponse:
802802
response: urllib3.HTTPResponse
803-
body: typing.Union[Unset, Schema]
804-
headers: typing.Union[Unset, typing.List[HeaderParameter]]
803+
body: typing.Union[Unset, Schema] = unset
804+
headers: typing.Union[Unset, typing.Dict[str, Schema]] = unset
805805

806806
def __init__(
807807
self,
808808
response: urllib3.HTTPResponse,
809-
body: typing.Union[Unset, typing.Type[Schema]],
810-
headers: typing.Union[Unset, typing.List[HeaderParameter]]
809+
body: typing.Union[Unset, Schema] = unset,
810+
headers: typing.Union[Unset, typing.Dict[str, Schema]] = unset
811811
):
812812
"""
813813
pycharm needs this to prevent 'Unexpected argument' warnings

samples/openapi3/client/petstore/python/petstore_api/api_client.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -800,14 +800,14 @@ class MediaType:
800800
@dataclass
801801
class ApiResponse:
802802
response: urllib3.HTTPResponse
803-
body: typing.Union[Unset, Schema]
804-
headers: typing.Union[Unset, typing.List[HeaderParameter]]
803+
body: typing.Union[Unset, Schema] = unset
804+
headers: typing.Union[Unset, typing.Dict[str, Schema]] = unset
805805

806806
def __init__(
807807
self,
808808
response: urllib3.HTTPResponse,
809-
body: typing.Union[Unset, typing.Type[Schema]],
810-
headers: typing.Union[Unset, typing.List[HeaderParameter]]
809+
body: typing.Union[Unset, Schema] = unset,
810+
headers: typing.Union[Unset, typing.Dict[str, Schema]] = unset
811811
):
812812
"""
813813
pycharm needs this to prevent 'Unexpected argument' warnings

0 commit comments

Comments
 (0)