Title: Warn when import-mapping keys are JSON pointers instead of document paths · Issue #2459 · oapi-codegen/oapi-codegen · GitHub
Open Graph Title: Warn when import-mapping keys are JSON pointers instead of document paths · Issue #2459 · oapi-codegen/oapi-codegen
X Title: Warn when import-mapping keys are JSON pointers instead of document paths · Issue #2459 · oapi-codegen/oapi-codegen
Description: In #2078 a user wrote: import-mapping: "#/components/schemas": mymodule/internal/dto expecting internal component refs to be remapped to another Go package. import-mapping keys are external document paths (files or URLs), not JSON pointe...
Open Graph Description: In #2078 a user wrote: import-mapping: "#/components/schemas": mymodule/internal/dto expecting internal component refs to be remapped to another Go package. import-mapping keys are external documen...
X Description: In #2078 a user wrote: import-mapping: "#/components/schemas": mymodule/internal/dto expecting internal component refs to be remapped to another Go package. import-mapping keys are extern...
Opengraph URL: https://github.com/oapi-codegen/oapi-codegen/issues/2459
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Warn when import-mapping keys are JSON pointers instead of document paths","articleBody":"In #2078 a user wrote:\n\n```yaml\nimport-mapping:\n \"#/components/schemas\": mymodule/internal/dto\n```\n\nexpecting internal component refs to be remapped to another Go package. `import-mapping` keys are external document paths (files or URLs), not JSON pointers, so an entry like this silently never matches anything — the user just sees unresolved types with no hint about why.\n\nTwo small improvements:\n\n- Configuration validation should reject (or warn on) `import-mapping` keys starting with `#`, with a message along the lines of \"import-mapping keys are document paths; internal refs cannot be remapped — see the import-mapping examples\".\n- The README section on `import-mapping` should state explicitly that keys are document paths, that internal `$ref`s always resolve to the current package, and point at `examples/import-mapping/` for the two supported layouts (separate packages via spec split, same package via the `\"-\"` mapping).\n","author":{"url":"https://github.com/mromaszewicz","@type":"Person","name":"mromaszewicz"},"datePublished":"2026-07-13T00:27:19Z","url":"https://github.com/oapi-codegen/oapi-codegen/issues/2459"}
| 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:ab4ceaf8-9bdf-36f5-25cf-ee01d58bfeb8 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BDCA:1D16FB:753D4E:A48757:6AF9CD05 |
| html-safe-nonce | f4804a36bcc3a6be1e8631789027ff71ca430659f5174e6a9e97dab7046d819a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCRENBOjFEMTZGQjo3NTNENEU6QTQ4NzU3OjZBRjlDRDA1IiwidmlzaXRvcl9pZCI6Ijg2Mjg4ODg0Njk3MDA3MjYwMjEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 788d2b25e480f66cd54c6b5da327b3f3742454a6661659d2b20868d730dcffa6 |
| hovercard-subject-tag | issue:4869397564 |
| 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/2459/issue_layout |
| twitter:image | https://opengraph.githubassets.com/93a8414894ecfc0cc35469ae1a6120737437c84153884e8e90f136d88c185b06/oapi-codegen/oapi-codegen/issues/2459 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/93a8414894ecfc0cc35469ae1a6120737437c84153884e8e90f136d88c185b06/oapi-codegen/oapi-codegen/issues/2459 |
| og:image:alt | In #2078 a user wrote: import-mapping: "#/components/schemas": mymodule/internal/dto expecting internal component refs to be remapped to another Go package. import-mapping keys are external documen... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | mromaszewicz |
| 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