oapi-codegen icon indicating copy to clipboard operation
oapi-codegen copied to clipboard

External references is not propagated

Open ShouheiNishi opened this issue 2 years ago • 2 comments

In some case, external references is not propagated. So allOf generates broken code.

ShouheiNishi avatar Aug 23 '23 06:08 ShouheiNishi

Test code in https://github.com/ShouheiNishi/oapi-codegen/commit/635077fa443da80f9e49f0d2d98bdec82ce9b1c0

$ git status
HEAD detached at 635077f
nothing to commit, working tree clean
$ go generate ./internal/test/issues/issue-1202/...
$ go test ./internal/test/issues/issue-1202/...
# github.com/deepmap/oapi-codegen/internal/test/issues/issue-1202/pkg1
internal/test/issues/issue-1202/pkg1/pkg1.gen.go:10:12: undefined: TestObj3
?       github.com/deepmap/oapi-codegen/internal/test/issues/issue-1202/pkg2    [no test files]
FAIL
$

ShouheiNishi avatar Aug 23 '23 06:08 ShouheiNishi

Seems to be duplicate of: https://github.com/oapi-codegen/oapi-codegen/issues/632.

matoous avatar May 27 '25 08:05 matoous