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
deeply nested oneOf gets lost when merging allOf #1905
// Foo defines model for Foo.typeFoostruct {
AFoo*string`json:"a_foo,omitempty"`
}
when it should generate (helper functions omitted for brevity):
// Foo defines model for Foo.typeFoostruct {
AFoo*string`json:"a_foo,omitempty"`union json.RawMessage
}
// Foo0 defines model for .typeFoo0struct {
AFooOneOf0*string`json:"a_foo_one_of_0,omitempty"`
}
// Foo1 defines model for .typeFoo1struct {
AFooOneOf1*string`json:"a_foo_one_of_1,omitempty"`
}
note that above has been fixed (and unit test added) in #1904
I've just hit the same issue while trying to upgrade from an older oapi-codegen version. I really want to turn off old-merge-schemas: true compatibility mode, but i have some schemas that have nested oneOf and anyOf, both of which get dropped.
Activity
fix: oapi-codegen#1905 tag with ticket
campbellr commentedon Jun 3, 2026
I've just hit the same issue while trying to upgrade from an older oapi-codegen version. I really want to turn off
old-merge-schemas: truecompatibility mode, but i have some schemas that have nested oneOf and anyOf, both of which get dropped.Fix nested allOf/anyOf merging (oapi-codegen#2471)