oapi-codegen / oapi-codegen

Generate Go client and server boilerplate from OpenAPI 3 specifications
Apache License 2.0
6.1k stars 844 forks source link

Type name hints via extensions #25

Open deepmap-marcinr opened 5 years ago

deepmap-marcinr commented 5 years ago

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.

yudppp commented 4 years ago

@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?

B-Lorentz commented 2 years ago

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.