Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update http exception's schema construction to include items key… #2999

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion litestar/_openapi/responses.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,11 @@ def create_error_responses(exceptions: list[type[HTTPException]]) -> Iterator[tu
"status_code": Schema(type=OpenAPIType.INTEGER),
"detail": Schema(type=OpenAPIType.STRING),
"extra": Schema(
type=[OpenAPIType.NULL, OpenAPIType.OBJECT, OpenAPIType.ARRAY],
any_of=[
Schema(type=OpenAPIType.NULL),
Schema(type=OpenAPIType.OBJECT),
Schema(type=OpenAPIType.ARRAY, items=Schema()),
guacs marked this conversation as resolved.
Show resolved Hide resolved
],
additional_properties=Schema(),
),
},
Expand Down
Loading