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
Generate anonymous objects when generate: models #1512
I just came across this from the docs trying to figure out how to name anonymous types. It would seem to already be handled using x-go-type-name. E.g. the following will generate a type 'UpdateResponse'
Anonymous inline schemas can be given named types using the x-go-type-name extension. This is by design — schemas under components/schemas get named types, inline schemas are anonymous unless annotated.
Activity
jamietanna commentedon Mar 25, 2024
(May be a duplicate)
magnusp commentedon Nov 21, 2024
I've seen codegens utilize the schema
titleattribute to name the modelmagicmark commentedon Jan 14, 2025
Would very much appreciate this, yes!
pezzer55 commentedon Feb 27, 2025
I just came across this from the docs trying to figure out how to name anonymous types. It would seem to already be handled using x-go-type-name. E.g. the following will generate a type 'UpdateResponse'
mromaszewicz commentedon Feb 7, 2026
Anonymous inline schemas can be given named types using the
x-go-type-nameextension. This is by design — schemas undercomponents/schemasget named types, inline schemas are anonymous unless annotated.