Skip to content

Support non standard http codes#1407

Open
Ykrej wants to merge 8 commits intoopenapi-generators:mainfrom
Ykrej:support-non-standard-http-codes
Open

Support non standard http codes#1407
Ykrej wants to merge 8 commits intoopenapi-generators:mainfrom
Ykrej:support-non-standard-http-codes

Conversation

@Ykrej
Copy link

@Ykrej Ykrej commented Feb 27, 2026

Summary

Added support for responses with non-standard HTTP Status Codes. Off by default, enabled with allow_int_response_codes.

Problem

Currently if a response with a status code that does not exist in http.HTTPStatusCode a ValueError is raised. For example: ValueError: 490 is not a valid HTTPStatus.

Edge Case

If a non-standard status code is received from an endpoint that doesn't define any responses with non-standard status codes the old behavior will appear.

@Ykrej Ykrej marked this pull request as draft February 27, 2026 06:40
@Ykrej Ykrej marked this pull request as ready for review February 27, 2026 06:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant