RicoSuter / NSwag

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

I´m trying to generate nswag documentation with studio and command line and nswag tries to crash my laptop #5010

Open mobius127 opened 1 month ago

mobius127 commented 1 month ago

Captura de pantalla 2024-10-28 164928

As you can see, when I´m trying to execute nswag to generate some documentation of the simpliest web api, nswag is trying to crash my laptop.

In the screen shot you can see what im saying. .NET Host process are multiplying like a virus!!! ApiNswag.zip

I left the project and i´m using it in my company apis with an older version and im trying to migrate from .net6 to .net8 and your library crashes and is not a clear migration manual from v13 to v14.

This is very dissapointing

vvdb-architecture commented 1 month ago

This might be due to recursive building. Do you have "nobuild": true in your nswag file to make sure nswag doesn't invoke itself?

mobius127 commented 1 month ago

Hi it worked but this is a serious bug. The memory of my laptop collapsed.

vvdb-architecture commented 1 month ago

I'm glad it worked! Despite the appearances, this is not really a bug. There are quite a number of differences between NSwag 13 and 14 and you need to adapt the config files in consequence. There is a thread on top of the issues that details the difference, but the information is sadly scattered. It's all a bit disappointing, but personally I stand by NSwag, since it's much better than that horrible Kiota.

aunikitin commented 1 week ago

Hello, experienced the same on macos. Could you attach doc with breaking changes for others and place, there I should add nobuild? I have several options: aspNetCoreToOpenApi, openApiToCSharpClient

vvdb-architecture commented 1 week ago

You may want to have a look at https://github.com/RicoSuter/NSwag/issues/4865