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
error merging schemas for AllOf: merging two schemas with different Nullable #1898
error generating code: error creating operation definitions: error generating response definitions: error generating request body definition: error generating Go schema for property 'user': error merging schemas: error merging schemas for AllOf: merging two schemas with different Nullable
I've scrolled through the code and it seems that the reason lies within the github.com/getkin/kin-openapi/openapi3 package. The Schema type it provides has the Nullable field as a bool, which makes it impossible to differentiate between the default and unset values, which makes the schema merge code to misbehave.
I'm not really sure what's the best way to address this issue. AFAIK, this OpenAPI idiom is quite popular to mix in some additional properties to shared schemas, and it doesn't really voilate the OpenAPI spec, so theoretically oapi-codegen should be able to deal with it.
Activity
boogie-byte commentedon Feb 10, 2025
Actually, this seems to be the same issue as #1883.
lukacat10 commentedon Feb 15, 2025
@boogie-byte I have commented my solution in #1883, you may find it helpful.
allOf#2107 as a duplicate of this issueallOf#2107 as a duplicate of this issueFix allOf/nullable detection and recursion (oapi-codegen#2473)
fix: replace a union's adopted fields on the next From*, and bind onl…
fix: allOf/anyOf/oneOf generation bugs, with an aggregate test matrix (…