Title: Generation of anonymous object schemas doesn't seem to work · Issue #626 · oapi-codegen/oapi-codegen · GitHub
Open Graph Title: Generation of anonymous object schemas doesn't seem to work · Issue #626 · oapi-codegen/oapi-codegen
X Title: Generation of anonymous object schemas doesn't seem to work · Issue #626 · oapi-codegen/oapi-codegen
Description: Given the following OpenAPI: openapi: '3.1.0' info: title: '' version: '' servers: [] paths: "/healthcheck": get: summary: "Healthcheck endpoint" responses: '200': description: OK content: application/json: schema: type: object additiona...
Open Graph Description: Given the following OpenAPI: openapi: '3.1.0' info: title: '' version: '' servers: [] paths: "/healthcheck": get: summary: "Healthcheck endpoint" responses: '200': description: OK content: applicat...
X Description: Given the following OpenAPI: openapi: '3.1.0' info: title: '' version: '' servers: [] paths: "/healthcheck": get: summary: "Healthcheck endpoint" respons...
Opengraph URL: https://github.com/oapi-codegen/oapi-codegen/issues/626
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Generation of anonymous object schemas doesn't seem to work","articleBody":"Given the following OpenAPI:\r\n\r\n```yml\r\nopenapi: '3.1.0'\r\ninfo:\r\n title: ''\r\n version: ''\r\nservers: []\r\npaths:\r\n \"/healthcheck\":\r\n get:\r\n summary: \"Healthcheck endpoint\"\r\n responses:\r\n '200':\r\n description: OK\r\n content:\r\n application/json:\r\n schema:\r\n type: object\r\n additionalProperties: false\r\n properties:\r\n health:\r\n type: string\r\n enum:\r\n - \"ok\"\r\n```\r\n\r\nWe'll get generated the following struct:\r\n\r\n```go\r\ntype GetHealthcheckResponse struct {\r\n\tBody []byte\r\n\tHTTPResponse *http.Response\r\n\tJSON200 *struct {\r\n\t\tHealth *N200Health `json:\"health,omitempty\"`\r\n\t}\r\n}\r\n```\r\n\r\n**However**, `N200Health` isn't defined anywhere 😅 ","author":{"url":"https://github.com/jamietanna","@type":"Person","name":"jamietanna"},"datePublished":"2022-06-10T14:40:12.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/626/oapi-codegen/issues/626"}
| 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:aa7a870a-9bb5-57fe-2986-b0c5ff493d13 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 994C:8D11E:10DC79C:1847714:6A4E5652 |
| html-safe-nonce | 2c24a42da0e34a71c419daad6731ae7848af8036472a35f2d644d9e425bc6953 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5OTRDOjhEMTFFOjEwREM3OUM6MTg0NzcxNDo2QTRFNTY1MiIsInZpc2l0b3JfaWQiOiI1MTA4MTU2Mjg3OTgxMzQ0MzM4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 88585749abdd75de0786a2f02037ff8ae3018347329845f0e60196bac85ac7e9 |
| hovercard-subject-tag | issue:1267645294 |
| 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/626/issue_layout |
| twitter:image | https://opengraph.githubassets.com/b7ae10fc15c8a2388fc29a8b0dfa89c10fdef92303c5cf179aa4db03bcb1a349/oapi-codegen/oapi-codegen/issues/626 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/b7ae10fc15c8a2388fc29a8b0dfa89c10fdef92303c5cf179aa4db03bcb1a349/oapi-codegen/oapi-codegen/issues/626 |
| og:image:alt | Given the following OpenAPI: openapi: '3.1.0' info: title: '' version: '' servers: [] paths: "/healthcheck": get: summary: "Healthcheck endpoint" responses: '200': description: OK content: applicat... |
| 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 | 030096ee0db095447bfe77409d33bfac127ca7128299c58deef27c52eaa1b1f0 |
| 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 | f344f1eab54fc7dfc02d0d018cda7e158c3db65c |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width