RicoSuter / NSwag

The Swagger/OpenAPI toolchain for .NET, ASP.NET Core and TypeScript.
http://NSwag.org
MIT License
6.78k stars 1.29k forks source link

NSwag.MSBuild (14.0.0-preview012) rewrites nswag.json file and deletes many settings #4660

Closed alex1ozr closed 9 months ago

alex1ozr commented 10 months ago

Hello! I'm currently updating my project to .NET 8 with the latest version of NSwag (14.0.0-preview012). I am encountering an issue with configuring documentGenerator/aspNetCoreToOpenApi section in nswag.json. I cannot set "useHttpAttributeNameAsOperationId": true.

Everytime I build ClientGenerator project (yes, I use MSBuild based client generation) it automatically rewrites nswag.json and deletes many (written by me) settings from there. Here is an example.

Is this behavior expected or is it a bug? Thank you in advance for your help.

krzyhan commented 10 months ago

As I wrote in https://github.com/RicoSuter/NSwag/discussions/4695 the reason is that most properties are moved from command to the Schema.

Right now they can be set in the code directly.

alex1ozr commented 9 months ago

@krzyhan , I see, thank you!