forked from loafle/openapi-generator-original
Fixed issues with list return types failing code gen for lanaguages that return Arrays for Lists
This commit is contained in:
parent
d715574238
commit
d871755e8d
@ -31,7 +31,9 @@ public class ResourceMethod {
|
|||||||
private List<MethodArgument> queryParameters;
|
private List<MethodArgument> queryParameters;
|
||||||
|
|
||||||
private List<MethodArgument> pathParameters;
|
private List<MethodArgument> pathParameters;
|
||||||
|
|
||||||
|
private String returnValueFromOperationJson;
|
||||||
|
|
||||||
private String returnValue;
|
private String returnValue;
|
||||||
|
|
||||||
private String returnClassName;
|
private String returnClassName;
|
||||||
@ -114,6 +116,14 @@ public class ResourceMethod {
|
|||||||
this.returnValue = returnValue;
|
this.returnValue = returnValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getReturnValueFromOperationJson() {
|
||||||
|
return returnValueFromOperationJson;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setReturnValueFromOperationJson(String returnValue) {
|
||||||
|
this.returnValueFromOperationJson = returnValue;
|
||||||
|
}
|
||||||
|
|
||||||
public String getReturnClassName() {
|
public String getReturnClassName() {
|
||||||
return returnClassName;
|
return returnClassName;
|
||||||
}
|
}
|
||||||
@ -206,7 +216,7 @@ public class ResourceMethod {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean isReturnValueList() {
|
public boolean isReturnValueList() {
|
||||||
if(this.getReturnValue().startsWith("List")){
|
if(this.getReturnValueFromOperationJson().startsWith("List")){
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
@ -310,6 +310,7 @@ public class EndpointOperation {
|
|||||||
else{
|
else{
|
||||||
method.setHasResponseValue(true);
|
method.setHasResponseValue(true);
|
||||||
}
|
}
|
||||||
|
method.setReturnValueFromOperationJson(responseClass);
|
||||||
method.setReturnValue(dataTypeMapper.getClassType(responseClass, false));
|
method.setReturnValue(dataTypeMapper.getClassType(responseClass, false));
|
||||||
method.setReturnClassName(dataTypeMapper.getGenericType(responseClass));
|
method.setReturnClassName(dataTypeMapper.getGenericType(responseClass));
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user