Fix returning NoContent. (#9830)

This commit is contained in:
Michał J. Gajda
2021-06-26 12:20:59 +02:00
committed by GitHub
parent 0f578d4a83
commit 1cd1001e34

View File

@@ -564,7 +564,7 @@ public class HaskellServantCodegen extends DefaultCodegen implements CodegenConf
// Add the HTTP method and return type
String returnType = op.returnType;
if (returnType == null || returnType.equals("null")) {
returnType = "()";
returnType = "NoContent";
}
if (returnType.indexOf(" ") >= 0) {
returnType = "(" + returnType + ")";