Skip to content

Commit e883793

Browse files
committed
Avoid generating singleton Unions
1 parent dff9996 commit e883793

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

end_to_end_tests/multiple-media-types-golden-record/multiple_media_types_client/api/multiple_media_types/post.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@ def _parse_response(
3636
response_200 = cast(Any, response.content)
3737
return response_200
3838

39+
if response.status_code == 404:
40+
response_404: Any
41+
if response.headers.get("content-type") == "text/plain":
42+
response_404 = cast(Any, response.text)
43+
return response_404
44+
3945
if response.status_code == 503:
4046
response_503: ErrorResponse | Any
4147
if response.headers.get("content-type") == "application/json":

end_to_end_tests/multiple-media-types.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ paths:
1515
schema:
1616
const: "Why have a fixed response? I dunno"
1717
"application/octet-stream": {}
18+
"404":
19+
description: "Not Found"
20+
content:
21+
"text/plain": {}
1822
"503":
1923
description: "Server Not Available"
2024
content:

0 commit comments

Comments
 (0)