Yelp / bravado

Bravado is a python client library for Swagger 2.0 services
Other
605 stars 117 forks source link

Support for generating enums from swagger file in clientlib #387

Closed AndrewPau closed 6 years ago

AndrewPau commented 6 years ago

Enums declared in swagger files currently don't get generated in their corresponding clientlibs. It would be useful for clients to easily and programmatically access all enum values in the clientlib in the form of an array or set, instead of manually looking through the swagger file. This would help clients avoid having to guess enum input values/spelling mistakes and waiting for a failure response for validation, or making multiple queries to see all enum response values.

It would be really helpful if this feature could be implemented. Thank you!

sjaensch commented 6 years ago

Hey @AndrewPau, that's a great suggestion! The generated type annotations are not part of the bravado library however, but of our generated clientlibs which are not open source. Could you refile your request as a ticket in the COREBACK project? Thanks!