From aff4d2f4c29dfbc28b6097790ea841955059a8a3 Mon Sep 17 00:00:00 2001 From: Isaac van Bakel Date: Sat, 21 Aug 2021 15:52:14 +0100 Subject: [PATCH] Correct #9916, fix Produces instances (#10185) While the fix in #9916 correctly made endpoint types which did not produce content return the `NoContent` type, those endpoint still generated `Produces` instances with the wrong mime types due to not resetting the `hasProduces` variable. This corrects that fix so that the `Produces` instance for `MimeNoContent` is generated instead of any other instance. --- .../openapitools/codegen/languages/HaskellHttpClientCodegen.java | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/HaskellHttpClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/HaskellHttpClientCodegen.java index f1978e172015..561f2f06bbf4 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/HaskellHttpClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/HaskellHttpClientCodegen.java @@ -881,6 +881,7 @@ public class HaskellHttpClientCodegen extends DefaultCodegen implements CodegenC if (returnType == null || returnType.equals("null")) { returnType = "NoContent"; SetNoContent(op, VENDOR_EXTENSION_X_INLINE_ACCEPT); + op.hasProduces = false; } if (returnType.contains(" ")) { returnType = "(" + returnType + ")";