Open mdzieg opened 5 months ago
Related issues: https://github.com/RicoSuter/NSwag/issues/1259 https://github.com/RicoSuter/NSwag/issues/1602 https://github.com/RicoSuter/NSwag/issues/2995 https://github.com/RicoSuter/NSwag/issues/4064
You can try one of the work-arounds indicated in one of these comments: https://github.com/RicoSuter/NSwag/issues/1259#issuecomment-1889574322 https://github.com/RicoSuter/NSwag/issues/2995#issuecomment-705532765 https://github.com/RicoSuter/NSwag/issues/2995#issuecomment-732359530 https://github.com/RicoSuter/NSwag/issues/2995#issuecomment-1262311104 https://github.com/RicoSuter/NSwag/issues/2995#issuecomment-1809992937
I have a problem with C# generator. Version 13.6.2 is the latest one what works. Code generated with that version looks like this:
As of version 13.7.0, generated code thwors exception instead of default value in case 204 status code is returned:
I added attributes on controller method to inform generator that it can result with 204, and the code generated is also not okay:
swagger.json looks more or less like this (after applying attributes):
@RicoSuter What should I do to get correct 204 status code handling.