openapi-python-client
openapi-python-client copied to clipboard
Add literals alongside enums
Generating literal types alongside string and int Enums. We really need it in our code so have this in our custom templates. I thought there are others who would like to have it in the default template.
Are you using literals instead of enums? Is there a particular limitation of enums that makes that necessary? Trying to understand if this should be an option in config (to generate literals instead) or if it makes sense to completely replace enums with literals 🤔
We are using literals instead of enums in a public library with a lot of choice parameters where having enums would mean a lot of typing for the user and generally more noise in the code. There are still many developers out there who prefer to use enums instead of literals, so making it configurable would be a much better option!
Replaced by https://github.com/openapi-generators/openapi-python-client/pull/1076