Title: `Input should be a valid string` for integer keys in openapi.yaml · Issue #1333 · openapi-generators/openapi-python-client · GitHub
Open Graph Title: `Input should be a valid string` for integer keys in openapi.yaml · Issue #1333 · openapi-generators/openapi-python-client
X Title: `Input should be a valid string` for integer keys in openapi.yaml · Issue #1333 · openapi-generators/openapi-python-client
Description: Describe the bug When generating classes from openapi.yaml with integers as keys (e.g. 200), I get the error: paths./api/events.get.responses.200.[key] Input should be a valid string [type=string_type, input_value=200, input_type=int] Fo...
Open Graph Description: Describe the bug When generating classes from openapi.yaml with integers as keys (e.g. 200), I get the error: paths./api/events.get.responses.200.[key] Input should be a valid string [type=string_t...
X Description: Describe the bug When generating classes from openapi.yaml with integers as keys (e.g. 200), I get the error: paths./api/events.get.responses.200.[key] Input should be a valid string [type=string_t...
Opengraph URL: https://github.com/openapi-generators/openapi-python-client/issues/1333
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"`Input should be a valid string` for integer keys in openapi.yaml","articleBody":"**Describe the bug**\nWhen generating classes from openapi.yaml with integers as keys (e.g. 200), I get the error:\n\n```\npaths./api/events.get.responses.200.[key]\n Input should be a valid string [type=string_type, input_value=200, input_type=int]\n For further information visit https://errors.pydantic.dev/2.12/v/string_type\n```\n\nIs there a chance to ignore those errors and fall back to string for integer keys?\n\n**OpenAPI Spec File**\n[Link to an OpenAPI document](https://api.datamesh-manager.com/openapi.yaml)\n\n**Desktop (please complete the following information):**\n - OS: macOS 26.0.1\n - Python Version: 13.3\n - openapi-python-client version: 0.26.2\n","author":{"url":"https://github.com/mymindwentblvnk","@type":"Person","name":"mymindwentblvnk"},"datePublished":"2025-10-10T11:30:47.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/1333/openapi-python-client/issues/1333"}
| 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:968190c7-2d19-9ede-325d-a5913108262a |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E2F8:3F5F3:155C0FD:1B8AF9E:697FC9C9 |
| html-safe-nonce | b8458d853642f088d2dce101b41d68390706febeab62b47de06d6e4f606f4949 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMkY4OjNGNUYzOjE1NUMwRkQ6MUI4QUY5RTo2OTdGQzlDOSIsInZpc2l0b3JfaWQiOiIzNzY1NDc1NDEwMTY3NDUwMDU3IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 715d3f365e46eb27c55406e37973836ca9c81976cb12e36a0568a42cc7163e78 |
| hovercard-subject-tag | issue:3502488726 |
| 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/1333/issue_layout |
| twitter:image | https://opengraph.githubassets.com/ad7056511de8c26f14d456110fe88a67104d32b6e1714cef524af39a0ec9857e/openapi-generators/openapi-python-client/issues/1333 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ad7056511de8c26f14d456110fe88a67104d32b6e1714cef524af39a0ec9857e/openapi-generators/openapi-python-client/issues/1333 |
| og:image:alt | Describe the bug When generating classes from openapi.yaml with integers as keys (e.g. 200), I get the error: paths./api/events.get.responses.200.[key] Input should be a valid string [type=string_t... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | mymindwentblvnk |
| 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