You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] Golang - When using import mappings, import mapping is not properly generated when using composition plus slice pointer type #2008
changed the title [-][BUG] Golang - When using import mappings, import mapping is not properly generated when using composition plus slice type[/-][+][BUG] Golang - When using import mappings, import mapping is not properly generated when using composition plus slice pointer type[/+]on Jun 20, 2025
Issue #2008 reports that allOf composition with an external ref produces unqualified array item types (e.g., *[]Thing instead of *[]externalRef0.Thing). PR #2299 (commit 1c89479, merged 2026-04-29) added propagateRemoteRefs() in pkg/codegen/merge_schemas.go, which recursively rewrites local #/... refs — including array item refs — to include the remote component path when an external schema is flattened via allOf. A repro spec built from the issue description generates the correct *[]externalRef0.Thing output on current HEAD, and the regression test in internal/test/externalref/packageA confirms *[]externalRef0.Role is correctly generated. The first commenter on the issue noted 3 days after opening that it didn't reproduce on master, consistent with this being fixed before any release.
Closing as fixed. If you can still reproduce on a recent release, please reopen with the exact spec and version used.
Activity
[-][BUG] Golang - When using import mappings, import mapping is not properly generated when using composition plus slice type[/-][+][BUG] Golang - When using import mappings, import mapping is not properly generated when using composition plus slice pointer type[/+]chaslain commentedon Jun 23, 2025
This issue does not appear in master - is it time for another release?
Cannot access master without forking.
LarsStegman commentedon Sep 15, 2025
Are you sure this doesn't happen in master? I tried it with the master build, but it isn't working for me.
mromaszewicz commentedon May 1, 2026
Issue #2008 reports that allOf composition with an external ref produces unqualified array item types (e.g.,
*[]Thinginstead of*[]externalRef0.Thing). PR #2299 (commit 1c89479, merged 2026-04-29) added propagateRemoteRefs() in pkg/codegen/merge_schemas.go, which recursively rewrites local #/... refs — including array item refs — to include the remote component path when an external schema is flattened via allOf. A repro spec built from the issue description generates the correct*[]externalRef0.Thingoutput on current HEAD, and the regression test in internal/test/externalref/packageA confirms*[]externalRef0.Roleis correctly generated. The first commenter on the issue noted 3 days after opening that it didn't reproduce on master, consistent with this being fixed before any release.Closing as fixed. If you can still reproduce on a recent release, please reopen with the exact spec and version used.