mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-06-29 04:00:51 +00:00
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> pathParameters;
|
||||
|
||||
|
||||
private String returnValueFromOperationJson;
|
||||
|
||||
private String returnValue;
|
||||
|
||||
private String returnClassName;
|
||||
@ -114,6 +116,14 @@ public class ResourceMethod {
|
||||
this.returnValue = returnValue;
|
||||
}
|
||||
|
||||
public String getReturnValueFromOperationJson() {
|
||||
return returnValueFromOperationJson;
|
||||
}
|
||||
|
||||
public void setReturnValueFromOperationJson(String returnValue) {
|
||||
this.returnValueFromOperationJson = returnValue;
|
||||
}
|
||||
|
||||
public String getReturnClassName() {
|
||||
return returnClassName;
|
||||
}
|
||||
@ -206,7 +216,7 @@ public class ResourceMethod {
|
||||
}
|
||||
|
||||
public boolean isReturnValueList() {
|
||||
if(this.getReturnValue().startsWith("List")){
|
||||
if(this.getReturnValueFromOperationJson().startsWith("List")){
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
@ -310,6 +310,7 @@ public class EndpointOperation {
|
||||
else{
|
||||
method.setHasResponseValue(true);
|
||||
}
|
||||
method.setReturnValueFromOperationJson(responseClass);
|
||||
method.setReturnValue(dataTypeMapper.getClassType(responseClass, false));
|
||||
method.setReturnClassName(dataTypeMapper.getGenericType(responseClass));
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user