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
Can this issue be reproduced with the latest version?
Yes
What did you do?
For the schema below, generating gives an error. However, removing either the b or c field under the schema for A works.
invalid recursive type A
oas_schemas_gen.go(6, 6): A refers to
oas_schemas_gen.go(162, 6): OptC refers to
oas_schemas_gen.go(47, 6): C refers to
oas_schemas_gen.go(70, 6): OptA refers to
oas_schemas_gen.go(6, 6): A
allengu01
changed the title
Recursive types: Bug for struct with multiple recursive fields
Recursive types: Bug for struct with multiple recursive fields or oneOf
Aug 12, 2024
What version of ogen are you using?
v1.2.2
Can this issue be reproduced with the latest version?
Yes
What did you do?
For the schema below, generating gives an error. However, removing either the
b
orc
field under the schema forA
works.Having a recursive field within oneOf also errors:
What did you expect to see?
From the docs, recursive types should be using pointers to avoid errors with Golang structs.
What did you see instead?
A's type looks like:
B's type looks like:
C's type, however, looks like:
The text was updated successfully, but these errors were encountered: