oapi-codegen icon indicating copy to clipboard operation
oapi-codegen copied to clipboard

Type name hints via extensions

Open deepmap-marcinr opened this issue 6 years ago • 2 comments

Schemas, Operations, support Swagger extensions. Rather than inferring Go type names from those properties, we can also allow specifying them. Adding support for an extension like x-go-typename on those would allow for more flexibility in naming the Swagger properties more clearly since they don't have to map to the same Go type.

deepmap-marcinr avatar Jun 06 '19 13:06 deepmap-marcinr

@deepmap-marcinr @mgurevin Hi marcinr and mgurevin. I want to this feature too. https://github.com/deepmap/oapi-codegen/pull/212 is implements this issue. What do you think?

yudppp avatar Jul 31 '20 05:07 yudppp

#212 solves a different issue: when you need to inject a type from elsewhere (like something you have hand-written) What would also be useful if to be able to directly control how the generated types are named.

B-Lorentz avatar Jul 28 '22 07:07 B-Lorentz