I don't think there is an option for this, but in the case of consuming a 3rd party OpenAPI spec that inlines all definitions instead of using components the go code generated contains only anonymous nested structs. It would be nice if there was a way to generate named structs instead to make interacting with the generated API code a bit nicer in these cases.