Rico Suter
Rico Suter
Just checked, in the 13.6.2 version, if the spec was correctly specifying 204 this already throw an exception:  So the old behavior is just "as expected" when the spec...
This needs to be tested if asp allows that - otherwise we can build a custom processor which does that (second point in the list).
I think the reason is that OpenAPI/Swagger does not have a property where we could map this to. See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#schemaObject
You can do that with a custom operation processer and the Namotion.Reflection library (which is automatically available when referencing the NSwag library). Adding it out-of-the-box would be a "breaking change"...
Can you create a PR to fix that?
Hi @stijnherreman, yes, I'd really appreciate it! I think the first step is to find a way to enhance the model (NSwag.Core) so that both versions (2/3) can be serialized/deserialized...
Most recent commits for enhancing the model for OpenApi 3: https://github.com/RSuter/NSwag/commit/3e22a080e439741b4105d8f5c32a6430507abf4e https://github.com/RSuter/NSwag/commit/1eebd6a978d8a02cf861cffe189d4c7b4954350a https://github.com/RSuter/NSwag/commit/8dfa231cd5d9b80e20f53f03a16c3c7df56106bd https://github.com/RSuter/NSwag/commit/aa3d161550232c4b23ba98f39e22ffda3923eb00 https://github.com/RSuter/NSwag/commit/ef1d3d185d832e16206ade0bde068629e72b9efd
Most unit tests for the OpenApi 3 serialization are here: https://github.com/RSuter/NSwag/tree/master/src/NSwag.Core.Tests/Serialization If someone (@stijnherreman ?) wants to help, we need more unit tests, some OpenApi 3 properties are still missing,...
The specs can be found here: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md most properties of OpenApi are implemented, what currently is missing (and which are the hardest one to sync): - **Operation.requestBody:** Operation.parameters.bodyParameter (Swagger)...
For proper inheritance support we also need: - https://github.com/RSuter/NJsonSchema/issues/224 (swagger generator) - https://github.com/RSuter/NJsonSchema/issues/13 (code generator)