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.
This commit is contained in:
Isaac van Bakel
2021-08-21 15:52:14 +01:00
committed by GitHub
parent f47dc4d84b
commit aff4d2f4c2

View File

@@ -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 + ")";