Title: Concurrency safe code generator · Issue #1813 · oapi-codegen/oapi-codegen · GitHub
Open Graph Title: Concurrency safe code generator · Issue #1813 · oapi-codegen/oapi-codegen
X Title: Concurrency safe code generator · Issue #1813 · oapi-codegen/oapi-codegen
Description: When using oapi-codegen as a library, it would be ideal for the code generation to be concurrency safe. The use of global state in the codegen package currently makes this not possible without refactoring code. Context: I am using oapi-c...
Open Graph Description: When using oapi-codegen as a library, it would be ideal for the code generation to be concurrency safe. The use of global state in the codegen package currently makes this not possible without refa...
X Description: When using oapi-codegen as a library, it would be ideal for the code generation to be concurrency safe. The use of global state in the codegen package currently makes this not possible without refa...
Opengraph URL: https://github.com/oapi-codegen/oapi-codegen/issues/1813
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Concurrency safe code generator","articleBody":"When using oapi-codegen as a library, it would be ideal for the code generation to be concurrency safe. The use of global state in the `codegen` package currently makes this not possible without refactoring code.\r\n\r\nContext:\r\n\r\nI am using oapi-codegen to generate code for a large API spec that I have split into multiple OpenAPI documents, each corresponding to a separate Go package to keep dependencies small for API consumers. I'd like to run oapi-codegen concurrently for each package to save time.\r\n\r\nSimilar to #1805 and #1174.\r\n\r\nI refactored the `codegen` package in a fork to see what the changes would look like: https://github.com/justenstall/oapi-codegen/tree/no-globals","author":{"url":"https://github.com/justenstall","@type":"Person","name":"justenstall"},"datePublished":"2024-10-23T19:57:15Z","url":"https://github.com/oapi-codegen/oapi-codegen/issues/1813"}
| 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:1d319189-0043-1c7f-00f1-fea17b9dfc6b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D502:15E212:2D6139:3F6666:6AF9CD08 |
| html-safe-nonce | fde557ceabdbaefdd19d213f7d00abde6ec0f0b7415fdde3dd0d314767070f1a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENTAyOjE1RTIxMjoyRDYxMzk6M0Y2NjY2OjZBRjlDRDA4IiwidmlzaXRvcl9pZCI6IjM0NTMyNjUxNzA3NzAwMjE2NDAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | dda0a6b582a1b99bc91cfaedeef2863490cae03ba5c1ccb1b624437d8551a2e6 |
| hovercard-subject-tag | issue:2609708878 |
| 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/1813/issue_layout |
| twitter:image | https://opengraph.githubassets.com/f00ffb042885a235395be98d147261e824f7b41e4c249b73a6ba12a8303af92e/oapi-codegen/oapi-codegen/issues/1813 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/f00ffb042885a235395be98d147261e824f7b41e4c249b73a6ba12a8303af92e/oapi-codegen/oapi-codegen/issues/1813 |
| og:image:alt | When using oapi-codegen as a library, it would be ideal for the code generation to be concurrency safe. The use of global state in the codegen package currently makes this not possible without refa... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | justenstall |
| 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