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 pointers, so an entry like this silently never matches anything — the user just sees unresolved types with no hint about why.
Two small improvements:
- 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".
- The README section on
import-mapping should state explicitly that keys are document paths, that internal $refs 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).
In #2078 a user wrote:
expecting internal component refs to be remapped to another Go package.
import-mappingkeys 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.Two small improvements:
import-mappingkeys 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".import-mappingshould state explicitly that keys are document paths, that internal$refs always resolve to the current package, and point atexamples/import-mapping/for the two supported layouts (separate packages via spec split, same package via the"-"mapping).