Title: Patterned (4XX) HTTP Status Codes not respected · Issue #1271 · openapi-generators/openapi-python-client · GitHub
Open Graph Title: Patterned (4XX) HTTP Status Codes not respected · Issue #1271 · openapi-generators/openapi-python-client
X Title: Patterned (4XX) HTTP Status Codes not respected · Issue #1271 · openapi-generators/openapi-python-client
Description: 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 val...
Open Graph Description: 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: Inv...
X Description: 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: Inv...
Opengraph URL: https://github.com/openapi-generators/openapi-python-client/issues/1271
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Patterned (4XX) HTTP Status Codes not respected","articleBody":"**Describe the bug**\n[Documentation](https://github.com/openapi-generators/openapi-python-client/blob/61b6c54994e2a6285bb422ee3b864c45b5d88c15/openapi_python_client/schema/3.1.0.md?plain=1#L1671) 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:\n```Invalid response status code 4XX (not a valid HTTP status code), response will be omitted from generated client```\n\n**OpenAPI Spec File**\n`openapi-python-client generate --path PatternedStatusCodeRepro.openapi.yaml.txt` \n(github won't allow uploading a .yaml)\n\n[PatternedStatusCodeRepro.openapi.yaml.txt](https://github.com/user-attachments/files/20804333/PatternedStatusCodeRepro.openapi.yaml.txt)\n\n**Desktop:**\n - OS: macOS 15.5\n - Python Version: 3.13.3\n - openapi-python-client version: 0.25.0\n\n**Additional context**\nI believe the root cause here is [this](https://github.com/openapi-generators/openapi-python-client/blob/61b6c54994e2a6285bb422ee3b864c45b5d88c15/openapi_python_client/parser/openapi.py#L167) int conversion of the status code. This obviously won't work with a patterned HTTP status code like 4XX.\n","author":{"url":"https://github.com/cjkindel","@type":"Person","name":"cjkindel"},"datePublished":"2025-06-18T21:22:49.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/1271/openapi-python-client/issues/1271"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:cddf9bfa-63d3-ab86-f357-ba3aa71fb724 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E652:89F1F:7FB280:A34EC8:697F7C89 |
| html-safe-nonce | 066e6d8a76ea9da3ee976c7c368327a3419d5841fcb246f21159d87982bfdaca |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNjUyOjg5RjFGOjdGQjI4MDpBMzRFQzg6Njk3RjdDODkiLCJ2aXNpdG9yX2lkIjoiNDMwNTM4NjE0OTY5NTY4MzcyMSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 365e7fc40980cc2aa9107a67a89bed67f82988d615dba5558cc4dc7b37a999fa |
| hovercard-subject-tag | issue:3158198323 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/openapi-generators/openapi-python-client/1271/issue_layout |
| twitter:image | https://opengraph.githubassets.com/be7a5b750a4351ef465ed086507e2a8b212584c42679ff567dc5856522566e93/openapi-generators/openapi-python-client/issues/1271 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/be7a5b750a4351ef465ed086507e2a8b212584c42679ff567dc5856522566e93/openapi-generators/openapi-python-client/issues/1271 |
| og:image:alt | 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: Inv... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | cjkindel |
| hostname | github.com |
| expected-hostname | github.com |
| None | 60279d4097367e16897439d16d6bbe4180663db828c666eeed2656988ffe59f6 |
| turbo-cache-control | no-preview |
| go-import | github.com/openapi-generators/openapi-python-client git https://github.com/openapi-generators/openapi-python-client.git |
| octolytics-dimension-user_id | 84925606 |
| octolytics-dimension-user_login | openapi-generators |
| octolytics-dimension-repository_id | 240776275 |
| octolytics-dimension-repository_nwo | openapi-generators/openapi-python-client |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 240776275 |
| octolytics-dimension-repository_network_root_nwo | openapi-generators/openapi-python-client |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7c85641c598ad130c74f7bcc27f58575cac69551 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width