Closed meinsiedler closed 3 years ago
Hi, @meinsiedler
Yes, I will add this feature a little later
@meinsiedler done. See the latest version.
Nice, thank you @unchase!
How do I need to configure the swagger gen to have this feature?
services
.AddSwaggerGen(options =>
{
options.AddEnumsWithValuesFixFilters(); // will set x-enumNames and x-enumDescriptions
});
or do this to use the hyphen-separated names:
services
.AddSwaggerGen(options =>
{
options.AddEnumsWithValuesFixFilters(fixEnumsOptions =>
{
fixEnumsOptions.XEnumNamesAlias = "x-enum-varnames";
fixEnumsOptions.XEnumDescriptionsAlias = "x-enum-descriptions";
});
});
Hi!
The OpenAPI Generator uses
x-enum-varnames
to define names of the enum items as stated in the docs: https://openapi-generator.tech/docs/templating/#all-generators-coreWould it be possible to support
x-enum-varnames
additionally tox-enumNames
so that the OpenAPI generator can generate the correct enum variable names?