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
Error on v2 to V3 conversion when using a hashmap/dict with $ref "failed to resolve "definitions" in fragment in URI: "#/definitions/": struct field "definitions" not found"
#1016
Closed
jlsherrill opened this issue
Oct 7, 2024
· 1 comment
· Fixed by #1030
go test ./...
? github.com/getkin/kin-openapi/cmd/validate [no test files]
ok github.com/getkin/kin-openapi/openapi2 (cached)
? github.com/getkin/kin-openapi/openapi3gen/internal/subpkg [no test files]
--- FAIL: TestIssue1016 (0.00s)
issues1016_test.go:75:
Error Trace: /home/jlsherri/git/kin-openapi/openapi2conv/issues1016_test.go:75
Error: Received unexpected error:
failed to resolve "definitions" in fragment in URI: "#/definitions/Pet": struct field "definitions" not found
Test: TestIssue1016
This was introduced by #1011
within a v2 doc, anytime a map/dictionary is defined using a $ref, conversion to v3
fails:
Converting this results in:
failed to resolve "definitions" in fragment in URI: "#/definitions/Pet": struct field "definitions" not found
reproducer below
The text was updated successfully, but these errors were encountered: