Skip to content

Patterned (4XX) HTTP Status Codes not respected #1271

Open
@cjkindel

Description

@cjkindel

Describe the bug
Documentation indicates that patterned HTTP status codes may be used for Response Objects. Supply a patterened HTTP status code in this manner results in the following warning:
Invalid response status code 4XX (not a valid HTTP status code), response will be omitted from generated client

OpenAPI Spec File
openapi-python-client generate --path PatternedStatusCodeRepro.openapi.yaml.txt
(github won't allow uploading a .yaml)

PatternedStatusCodeRepro.openapi.yaml.txt

Desktop:

  • OS: macOS 15.5
  • Python Version: 3.13.3
  • openapi-python-client version: 0.25.0

Additional context
I believe the root cause here is this int conversion of the status code. This obviously won't work with a patterned HTTP status code like 4XX.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions