RicoSuter / NSwag

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

generated FileResponse class #4761

Open r-work opened 5 months ago

r-work commented 5 months ago

With v14, a FileResponse class is generated and getting the following error:

Error CS0121 The call is ambiguous between the following methods or properties: 'FileResponse.FileResponse(int, IReadOnlyDictionary<string, IEnumerable<string>>, Stream, IDisposable, IDisposable)' and 'FileResponse.FileResponse(int, IReadOnlyDictionary<string, IEnumerable<string>>, Stream, IDisposable, IDisposable)'

Error goes away when I manually remove the class, and things seem to work as expected.

This seems to happen when the controller returns IActionResult, and the method created in the client returns FileResponse for some reason.