Title: Allow `anyOf` with an `enum` (to indicate "a value in this enum or a plain string") to still render the enum · Issue #2412 · oapi-codegen/oapi-codegen · GitHub
Open Graph Title: Allow `anyOf` with an `enum` (to indicate "a value in this enum or a plain string") to still render the enum · Issue #2412 · oapi-codegen/oapi-codegen
X Title: Allow `anyOf` with an `enum` (to indicate "a value in this enum or a plain string") to still render the enum · Issue #2412 · oapi-codegen/oapi-codegen
Description: i.e. anyOf: - type: string - type: string enum: - rootly - manual - api - heartbeat # ... Will resolve as only being a string. Ideally we would keep this being a string, but still generate enums
Open Graph Description: i.e. anyOf: - type: string - type: string enum: - rootly - manual - api - heartbeat # ... Will resolve as only being a string. Ideally we would keep this being a string, but still generate enums
X Description: i.e. anyOf: - type: string - type: string enum: - rootly - manual - api - heartbeat # ... Will resolve as only being a string. Ideally we would keep this being a string, but still generate enums
Opengraph URL: https://github.com/oapi-codegen/oapi-codegen/issues/2412
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Allow `anyOf` with an `enum` (to indicate \"a value in this enum or a plain string\") to still render the enum","articleBody":"i.e.\n\n```yaml\n anyOf:\n - type: string\n - type: string\n enum:\n - rootly\n - manual\n - api\n - heartbeat\n # ...\n```\n\nWill resolve as only being a `string`.\n\nIdeally we would keep this being a `string`, but still generate enums\n","author":{"url":"https://github.com/jamietanna","@type":"Person","name":"jamietanna"},"datePublished":"2026-06-18T09:40:16Z","url":"https://github.com/oapi-codegen/oapi-codegen/issues/2412"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf |
| 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:e5fff907-c9b2-d23d-f5b3-e768b011dd98 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BC42:2FFF08:2C16050:39CC0DF:6AF9BAE1 |
| html-safe-nonce | b3d168e4d59964bd9d0aa1c26e7e5e06eb6be9b470ea6f0639c2636ad0e1256b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQzQyOjJGRkYwODoyQzE2MDUwOjM5Q0MwREY6NkFGOUJBRTEiLCJ2aXNpdG9yX2lkIjoiMjk3OTE4MjYwOTAwODU0MDM4NSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | cc928da3c621e839090ec3c6f978dc61871e23448877abbb14cc15d526a83f30 |
| hovercard-subject-tag | issue:4691130539 |
| 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/oapi-codegen/oapi-codegen/2412/issue_layout |
| twitter:image | https://opengraph.githubassets.com/95cc5079fd4752323c963e3ec42442df599730a2afc5963d5be77ea4ec443eee/oapi-codegen/oapi-codegen/issues/2412 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/95cc5079fd4752323c963e3ec42442df599730a2afc5963d5be77ea4ec443eee/oapi-codegen/oapi-codegen/issues/2412 |
| og:image:alt | i.e. anyOf: - type: string - type: string enum: - rootly - manual - api - heartbeat # ... Will resolve as only being a string. Ideally we would keep this being a string, but still generate enums |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | jamietanna |
| hostname | github.com |
| expected-hostname | github.com |
| None | 612d3e6ffd693e7ea8d9fcf452370995872baef31d825b1fedef704cd3d24ac7 |
| turbo-cache-control | no-preview |
| go-import | github.com/oapi-codegen/oapi-codegen git https://github.com/oapi-codegen/oapi-codegen.git |
| octolytics-dimension-user_id | 142752710 |
| octolytics-dimension-user_login | oapi-codegen |
| octolytics-dimension-repository_id | 173009358 |
| octolytics-dimension-repository_nwo | oapi-codegen/oapi-codegen |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 173009358 |
| octolytics-dimension-repository_network_root_nwo | oapi-codegen/oapi-codegen |
| 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 | 072e34035c13c31543fba9f025cbbbda4210dae4 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width