Open Havunen opened 4 years ago
Other of the OneOf wrappers comes from here: https://github.com/RicoSuter/NSwag/blob/master/src/NSwag.Generation.WebApi/Processors/OperationParameterProcessor.cs#L498-L505
and other from here: https://github.com/Havunen/NSwag/blob/master/src/NSwag.Generation/OpenApiDocumentGenerator.cs#L127
@RicoSuter can something be done for this please, code generators dont work :(
After investigating this further OpenApi 3 specification does not mention any OneOf references to be used with enums
@RicoSuter Any updates on this? I am running into this issue as well, specifically for nullable enums or enums with default values being passed via query parameter. Why does the enum need to get wrapped in this way?
Having code:
Usage:
NSwag currently generates following output:
OneOf - OneOf syntax confuses Swagger client generator and it does not produce working code.
Expected result: Enum parameter should be like this: