Endpoint with responses with different status codes #2101
Xemnas0
started this conversation in
Potential Issues
Replies: 1 comment 2 replies
-
Looks like a bug to me. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Litestar version: 2.0.0b4
Pydantic version: 2.1.1
I've been trying to create an endpoint that returns different status codes depending on the outcome of the call.
The above code fails with the following errore
However, if I use dataclasses (as the code below)
The result is the following
Is this a bug?
The schema shown in the responses does not directly correspond to the schema of the dataclasses. How can I make them the same?
Beta Was this translation helpful? Give feedback.
All reactions