Title: code generated for components.requestBodies is invalid when described with same type as components.schemas · Issue #254 · oapi-codegen/oapi-codegen · GitHub
Open Graph Title: code generated for components.requestBodies is invalid when described with same type as components.schemas · Issue #254 · oapi-codegen/oapi-codegen
X Title: code generated for components.requestBodies is invalid when described with same type as components.schemas · Issue #254 · oapi-codegen/oapi-codegen
Description: When the code is generated for types with the swagger definition containing components.requestBodies and components.schemas have the same type name, the resulting code generated is not compilable. e.g. Pet paths: /pets: post: summary: Ad...
Open Graph Description: When the code is generated for types with the swagger definition containing components.requestBodies and components.schemas have the same type name, the resulting code generated is not compilable. ...
X Description: When the code is generated for types with the swagger definition containing components.requestBodies and components.schemas have the same type name, the resulting code generated is not compilable. ...
Opengraph URL: https://github.com/oapi-codegen/oapi-codegen/issues/254
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"code generated for components.requestBodies is invalid when described with same type as components.schemas","articleBody":"When the code is generated for types with the swagger definition containing components.requestBodies and components.schemas have the same type name, the resulting code generated is not compilable. e.g. Pet\r\n\r\npaths:\r\n /pets:\r\n post:\r\n summary: Add a new pet\r\n requestBody:\r\n $ref: '#/components/requestBodies/**Pet**'\r\n /pets/{petId}\r\n put:\r\n summary: Update a pet\r\n parameters: [ ... ]\r\n requestBody:\r\n $ref: '#/components/requestBodies/**Pet**'\r\ncomponents:\r\n requestBodies:\r\n **Pet**:\r\n description: A JSON object containing pet information\r\n required: true\r\n content:\r\n application/json:\r\n schema:\r\n $ref: '#/components/schemas/**Pet**'","author":{"url":"https://github.com/mahbh2001","@type":"Person","name":"mahbh2001"},"datePublished":"2020-11-19T20:16:13Z","url":"https://github.com/oapi-codegen/oapi-codegen/issues/254"}
| 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:69e77064-fcd5-4af1-a39c-e8581ff0bacc |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | AF2E:319B30:5A10C1:7EC282:6AF9C21E |
| html-safe-nonce | 472217435b7713b1ef447af4e9645d94cf702f59a0a7f098640570dbeb6fdb4c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBRjJFOjMxOUIzMDo1QTEwQzE6N0VDMjgyOjZBRjlDMjFFIiwidmlzaXRvcl9pZCI6IjMzMjk2NDg2Njc1OTcwNjI2ODYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | fa358add4d399cc06f49ceb0018236200438fa83f6794cf6c589321b3d5c0dab |
| hovercard-subject-tag | issue:746891352 |
| 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/254/issue_layout |
| twitter:image | https://opengraph.githubassets.com/10199e02946c04455bd428a0c5902ae713983f50f3678590cc36e064e96a5940/oapi-codegen/oapi-codegen/issues/254 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/10199e02946c04455bd428a0c5902ae713983f50f3678590cc36e064e96a5940/oapi-codegen/oapi-codegen/issues/254 |
| og:image:alt | When the code is generated for types with the swagger definition containing components.requestBodies and components.schemas have the same type name, the resulting code generated is not compilable. ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | mahbh2001 |
| 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