Skip to content

Commit 06e6fe8

Browse files
committed
Correct OpenAPITools#9916, fix Produces instances
While the fix in OpenAPITools#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.
1 parent 65a271c commit 06e6fe8

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/HaskellHttpClientCodegen.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -881,6 +881,7 @@ private void processReturnType(CodegenOperation op) {
881881
if (returnType == null || returnType.equals("null")) {
882882
returnType = "NoContent";
883883
SetNoContent(op, VENDOR_EXTENSION_X_INLINE_ACCEPT);
884+
op.hasProduces = false;
884885
}
885886
if (returnType.contains(" ")) {
886887
returnType = "(" + returnType + ")";

0 commit comments

Comments
 (0)