add vendor extension to handle void response in jaxrs-cxf

This commit is contained in:
wing328
2016-11-08 21:06:38 +08:00
parent d5ced7df38
commit cce410c463
34 changed files with 820 additions and 159 deletions

View File

@@ -139,8 +139,11 @@ public abstract class AbstractJavaJAXRSServerCodegen extends AbstractJavaCodegen
}
}
}
if ( operation.returnType == null ) {
operation.returnType = "void";
// set vendorExtensions.x-java-is-response-void to true as returnType is set to "void"
operation.vendorExtensions.put("x-java-is-response-void", true);
} else if ( operation.returnType.startsWith("List") ) {
String rt = operation.returnType;
int end = rt.lastIndexOf(">");