Title: Self-contained generated code with no external runtime dependencies · Issue #2342 · oapi-codegen/oapi-codegen · GitHub
Open Graph Title: Self-contained generated code with no external runtime dependencies · Issue #2342 · oapi-codegen/oapi-codegen
X Title: Self-contained generated code with no external runtime dependencies · Issue #2342 · oapi-codegen/oapi-codegen
Description: I’d like to propose support for generating code that is fully self-contained, without depending on external runtime/helper packages. To reduce dependency footprint and supply-chain risk, I would strongly prefer generated output that reli...
Open Graph Description: I’d like to propose support for generating code that is fully self-contained, without depending on external runtime/helper packages. To reduce dependency footprint and supply-chain risk, I would st...
X Description: I’d like to propose support for generating code that is fully self-contained, without depending on external runtime/helper packages. To reduce dependency footprint and supply-chain risk, I would st...
Opengraph URL: https://github.com/oapi-codegen/oapi-codegen/issues/2342
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Self-contained generated code with no external runtime dependencies","articleBody":"I’d like to propose support for generating code that is fully self-contained, without depending on external runtime/helper packages.\n\nTo reduce dependency footprint and supply-chain risk, I would strongly prefer generated output that relies on the Go standard library wherever possible, rather than importing additional packages for helpers, types, validation, marshaling, parameter binding, and other runtime behavior.\n\nThe main motivation is to make generated code easier to adopt in stricter environments where we want:\n\n- fewer external dependencies\n- simpler auditing and vendoring\n- less version coupling between generated code and helper libraries\n- more explicit, verbose generated logic instead of hidden/runtime behavior\n- code that is easier to copy, inspect, and maintain internally\n\nIn short, we would prefer the generated code to be self-contained, even if that means the output is more verbose.\n\nA few thoughts on scope:\n\n- a config option for “self-contained” or “no runtime deps” generation would be ideal\n- generated code could inline helper types/functions instead of importing them from external packages\n\nI realize this may involve tradeoffs in generated code size and maintenance burden, so I wanted to ask first whether this direction would be welcome.\n\nIf the project is open to receiving this change, I’d be happy to contribute an implementation.","author":{"url":"https://github.com/tigrato","@type":"Person","name":"tigrato"},"datePublished":"2026-04-29T12:05:24Z","url":"https://github.com/oapi-codegen/oapi-codegen/issues/2342"}
| 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:4f14e659-0a1b-585f-b306-7563f02da7fa |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BC4A:376D0C:13CDD95:1A4F836:6AF9BAE3 |
| html-safe-nonce | 99cbc9343db727b705338903cea529fce81e7f13b52a335f7e6abf5b1bffd09e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQzRBOjM3NkQwQzoxM0NERDk1OjFBNEY4MzY6NkFGOUJBRTMiLCJ2aXNpdG9yX2lkIjoiODk0MzEwNjcyNjU5Mjg4NzUyNCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 6a044f31725a62a3cbd00f6b25b1ba31bec3508bcebc5e1ff50f974062ddc4b9 |
| hovercard-subject-tag | issue:4350385107 |
| 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/2342/issue_layout |
| twitter:image | https://opengraph.githubassets.com/a169ea24f0d5b20415f2d55f541ee8c5542a7dc39d57906535e91ebd44c0920d/oapi-codegen/oapi-codegen/issues/2342 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/a169ea24f0d5b20415f2d55f541ee8c5542a7dc39d57906535e91ebd44c0920d/oapi-codegen/oapi-codegen/issues/2342 |
| og:image:alt | I’d like to propose support for generating code that is fully self-contained, without depending on external runtime/helper packages. To reduce dependency footprint and supply-chain risk, I would st... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | tigrato |
| 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