Closed mdzieg closed 7 months ago
@RicoSuter
downgraded back to
<PackageReference Include="NSwag.ApiDescription.Client" Version="13.6.2">
and with this version all is okay
so looks like a bug in one of the above versions...
EDIT: the next version after 13.6.2 introduces this problem. i have this problem on 13.7.0
i checked changes: https://github.com/RicoSuter/NSwag/commit/e1f7657efe3ac8b4b4f79ffac482e0c0aee21ff1#diff-65b33706483249f53a8138451372e3d3276b904d815dcb71d0ed0c8786ea2e70
and it seems that on my local box old template is used, where status codes are strings, whereas when building on azuredevops new version of the template is used.
i removed all packages from cache and did a rebuild.
I have a weird issue. When I build project in Rider (net8, debug) I have correct code in swaggerClient.cs. The code has correct handling of 200 and 204 status codes:
When I do a docker build on Linux, using:
I have swaggerClient.cs containing wrong code (204 results in exception):
In the output i can see nswag being called with this command:
dotnet --roll-forward-on-no-candidate-fx 2 "/root/.nuget/packages/nswag.msbuild/14.0.7/buildTransitive/../tools/Net80//dotnet-nswag.dll" openapi2csclient /className:swaggerClient /namespace:XXXX /input:"/src/YYYY/openapi/swagger.json" /output:"obj/swaggerClient.cs"
Is it my fault or is it a bug of some kind?
I tried building with the same commands on win11 and I have dll with correct code.
In the project file we have:
Project references only: