Title: Not generating all model types · Issue #1189 · oapi-codegen/oapi-codegen · GitHub
Open Graph Title: Not generating all model types · Issue #1189 · oapi-codegen/oapi-codegen
X Title: Not generating all model types · Issue #1189 · oapi-codegen/oapi-codegen
Description: Hi there, I'm having what looks like a very similar issue not generating all the mode types as fixed in #1177 and discussed in #1168. I'm using version v1.13.4. Not all the types are being generated for https://github.com/openai/openai-o...
Open Graph Description: Hi there, I'm having what looks like a very similar issue not generating all the mode types as fixed in #1177 and discussed in #1168. I'm using version v1.13.4. Not all the types are being generate...
X Description: Hi there, I'm having what looks like a very similar issue not generating all the mode types as fixed in #1177 and discussed in #1168. I'm using version v1.13.4. Not all the types are being ...
Opengraph URL: https://github.com/oapi-codegen/oapi-codegen/issues/1189
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Not generating all model types","articleBody":"Hi there, I'm having what looks like a very similar issue not generating all the mode types as fixed in #1177 and discussed in #1168. I'm using version **v1.13.4**. \r\n\r\nNot all the types are being generated for https://github.com/openai/openai-openapi/blob/master/openapi.yaml resulting in compilation errors. Sorry, I don't understand the issue enough to minimize the use case(s) that is failing. I am using `oapi-codegen -package api -o openapi.gen.go openapi.yaml ` to generate the code. I apologize if there is some gotchya I'm not aware of that I missed.\r\n\r\nThere are many const types being affected:\r\n```go\r\n// Defines values for CreateChatCompletionRequestFunctionCall0.\r\nconst (\r\n\tAuto CreateChatCompletionRequestFunctionCall0 = \"auto\"\r\n\tNone CreateChatCompletionRequestFunctionCall0 = \"none\"\r\n)\r\n```\r\nAuto and None are not defined anywhere.\r\nAnother interesting path to note is:\r\n```go\r\nconst (\r\n\tCodeDavinci002 CreateCompletionRequestModel1 = \"code-davinci-002\"\r\n\tTextAda001 CreateCompletionRequestModel1 = \"text-ada-001\"\r\n\tTextBabbage001 CreateCompletionRequestModel1 = \"text-babbage-001\"\r\n\tTextCurie001 CreateCompletionRequestModel1 = \"text-curie-001\"\r\n\tTextDavinci001 CreateCompletionRequestModel1 = \"text-davinci-001\"\r\n\tTextDavinci002 CreateCompletionRequestModel1 = \"text-davinci-002\"\r\n\tTextDavinci003 CreateCompletionRequestModel1 = \"text-davinci-003\"\r\n)\r\n```\r\nwhere `CreateCompletionRequestModel1` is defined but is a type alias of a non-defined type:\r\n```go\r\n// CreateCompletionRequestModel1 defines model for .\r\ntype CreateCompletionRequestModel1 CreateCompletionRequestModel\r\n\r\n```\r\nI do see the type define under componets:schema. I tried removing some more advanced schema usages like the linked references and aliases on the type but it didn't seem to make a difference.\r\n\r\nUnlike the other issue where if the types were in the response, most of these types are used in request bodies. I don't know if that is relevant or not to the issue.\r\n\r\nI haven't tried an older version yet, but that's my next step.","author":{"url":"https://github.com/beeblebrox","@type":"Person","name":"beeblebrox"},"datePublished":"2023-08-08T23:52:17Z","url":"https://github.com/oapi-codegen/oapi-codegen/issues/1189"}
| 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:6204bba0-8bbd-788d-fba4-3ba835415258 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DC44:2FFF08:2C9B913:3A7EA76:6AF9BE14 |
| html-safe-nonce | 51b65ce2ce0bacc854adb80ab175216329dd19cddb4bb6a06c30755a9e6ab01b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQzQ0OjJGRkYwODoyQzlCOTEzOjNBN0VBNzY6NkFGOUJFMTQiLCJ2aXNpdG9yX2lkIjoiODA4NjMwNDA4NzI2MDkwNDk4MCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | b75af9085793fe0e483f43ae3f2dd1f826c53467182bf03f934e947ef38130a6 |
| hovercard-subject-tag | issue:1842248109 |
| 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/1189/issue_layout |
| twitter:image | https://opengraph.githubassets.com/fbd907d65cbd287234b63e9b34d51d1c5debeaf469f277ab7b01447a38057965/oapi-codegen/oapi-codegen/issues/1189 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/fbd907d65cbd287234b63e9b34d51d1c5debeaf469f277ab7b01447a38057965/oapi-codegen/oapi-codegen/issues/1189 |
| og:image:alt | Hi there, I'm having what looks like a very similar issue not generating all the mode types as fixed in #1177 and discussed in #1168. I'm using version v1.13.4. Not all the types are being generate... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | beeblebrox |
| 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