Open VladuBogdanNicolae opened 8 months ago
Can you show openapi doc with schema part?
I'm asking because in the default example, everything is working fine:
(maybe you have different settings?)
I had similar issue, with camelCase
but that's because of some settings;
you can always override by ex.
document.ApplySettings(CreateNewtonsoftSchemaWithCamelCaseStrategy(), null);
private static NewtonsoftJsonSchemaGeneratorSettings CreateNewtonsoftSchemaWithCamelCaseStrategy()
=> new()
{
SchemaType = SchemaType.Swagger2,
SerializerSettings = new JsonSerializerSettings
{
ContractResolver = new CamelCasePropertyNamesContractResolver
{
NamingStrategy = new CamelCaseNamingStrategy()
},
ReferenceLoopHandling = ReferenceLoopHandling.Ignore,
}
};
Hi, I did come across an issue after migrating our app project to .NET 8. The type script client generator is now incorrectly referencing the model properties as PascalCase rather than camelCase resulting in undefined objects.
Our web api is correctly passing the properties as camelCase, the typescript client generated the API model props in the same way (camelCase), but the code referencing the model props from the http response is using PascalCase, please see:
I do use MSBuild and the NSwagExe_Net80 command based on nswag.json file generated via NSwagStudio:
Used packages:
Minimal Api config:
Please help...what can I do about this, it worked perfectly before in .NET 7 before the migration? Thank you.