@@ -47,7 +47,7 @@ def _get_kwargs(
47
47
}
48
48
49
49
50
- def _parse_response (* , response : httpx .Response ) -> Optional [Union [List [AModel ], HTTPValidationError ]]:
50
+ def _parse_response (* , response : httpx .Response ) -> Optional [Union [HTTPValidationError , List [AModel ]]]:
51
51
if response .status_code == 200 :
52
52
response_200 = []
53
53
_response_200 = response .json ()
@@ -61,10 +61,14 @@ def _parse_response(*, response: httpx.Response) -> Optional[Union[List[AModel],
61
61
response_422 = HTTPValidationError .from_dict (response .json ())
62
62
63
63
return response_422
64
+ if response .status_code == 423 :
65
+ response_423 = HTTPValidationError .from_dict (response .json ())
66
+
67
+ return response_423
64
68
return None
65
69
66
70
67
- def _build_response (* , response : httpx .Response ) -> Response [Union [List [AModel ], HTTPValidationError ]]:
71
+ def _build_response (* , response : httpx .Response ) -> Response [Union [HTTPValidationError , List [AModel ]]]:
68
72
return Response (
69
73
status_code = response .status_code ,
70
74
content = response .content ,
@@ -78,7 +82,7 @@ def sync_detailed(
78
82
client : Client ,
79
83
an_enum_value : List [AnEnum ],
80
84
some_date : Union [datetime .date , datetime .datetime ],
81
- ) -> Response [Union [List [AModel ], HTTPValidationError ]]:
85
+ ) -> Response [Union [HTTPValidationError , List [AModel ]]]:
82
86
kwargs = _get_kwargs (
83
87
client = client ,
84
88
an_enum_value = an_enum_value ,
@@ -97,7 +101,7 @@ def sync(
97
101
client : Client ,
98
102
an_enum_value : List [AnEnum ],
99
103
some_date : Union [datetime .date , datetime .datetime ],
100
- ) -> Optional [Union [List [AModel ], HTTPValidationError ]]:
104
+ ) -> Optional [Union [HTTPValidationError , List [AModel ]]]:
101
105
""" Get a list of things """
102
106
103
107
return sync_detailed (
@@ -112,7 +116,7 @@ async def asyncio_detailed(
112
116
client : Client ,
113
117
an_enum_value : List [AnEnum ],
114
118
some_date : Union [datetime .date , datetime .datetime ],
115
- ) -> Response [Union [List [AModel ], HTTPValidationError ]]:
119
+ ) -> Response [Union [HTTPValidationError , List [AModel ]]]:
116
120
kwargs = _get_kwargs (
117
121
client = client ,
118
122
an_enum_value = an_enum_value ,
@@ -130,7 +134,7 @@ async def asyncio(
130
134
client : Client ,
131
135
an_enum_value : List [AnEnum ],
132
136
some_date : Union [datetime .date , datetime .datetime ],
133
- ) -> Optional [Union [List [AModel ], HTTPValidationError ]]:
137
+ ) -> Optional [Union [HTTPValidationError , List [AModel ]]]:
134
138
""" Get a list of things """
135
139
136
140
return (
0 commit comments