We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When ASP.NET Core is configured with CamelCaseText StringEnumConverter, enums in TypeScript should be generated in CamelCase?
CamelCaseText
StringEnumConverter
services.AddMvc().AddJsonOptions(options => { options.SerializerSettings.Converters.Add(new StringEnumConverter {CamelCaseText = true}); });
The text was updated successfully, but these errors were encountered:
Can you also show a sample enum, the actual and expected output?
Sorry, something went wrong.
Actual API enum:
public enum MyEnum { Value1, Value2 }
Actual TypeScript output:
export enum MyEnum { Value1 = "Value1", Value2 = "Value2" }
Expected TypeScript output (camelCase string):
export enum MyEnum { Value1 = "value1", Value2 = "value2" }
TODO: Use SerializerSettings instead of ContractResolver in NSwag
Added EnumHandling.CamelCaseString and JsonSchemaGeneratorSettings.Se…
ed5b1cf
…rializerSettings, RicoSuter/NSwag#1387
8022772
No branches or pull requests
When ASP.NET Core is configured with
CamelCaseText
StringEnumConverter
, enums in TypeScript should be generated in CamelCase?The text was updated successfully, but these errors were encountered: