openapi-python-client icon indicating copy to clipboard operation
openapi-python-client copied to clipboard

Patterned (4XX) HTTP Status Codes not respected

Open cjkindel opened this issue 7 months ago • 0 comments

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.

cjkindel avatar Jun 18 '25 21:06 cjkindel