mirror of
https://github.com/jlengrand/openapi-generator.git
synced 2026-05-16 00:21:19 +00:00
fix for #191, not detecting correct file name
This commit is contained in:
@@ -6,7 +6,7 @@ import java.util.*;
|
||||
|
||||
public class CodegenOperation {
|
||||
public Boolean hasConsumes, hasProduces, hasParams, returnTypeIsPrimitive,
|
||||
returnSimpleType, subresourceOperation;
|
||||
returnSimpleType, subresourceOperation, isMapContainer, isListContainer;
|
||||
public String path, operationId, returnType, httpMethod, returnBaseType,
|
||||
returnContainer, summary, notes, baseName, defaultResponse;
|
||||
|
||||
|
||||
@@ -641,6 +641,10 @@ public class DefaultCodegen {
|
||||
op.returnType = cm.datatype;
|
||||
if(cm.isContainer != null) {
|
||||
op.returnContainer = cm.containerType;
|
||||
if("map".equals(cm.containerType))
|
||||
op.isMapContainer = Boolean.TRUE;
|
||||
else if ("list".equalsIgnoreCase(cm.containerType))
|
||||
op.isListContainer = Boolean.TRUE;
|
||||
}
|
||||
else
|
||||
op.returnSimpleType = true;
|
||||
@@ -697,7 +701,7 @@ public class DefaultCodegen {
|
||||
bodyParams.add(p.copy());
|
||||
}
|
||||
else if(param instanceof FormParameter) {
|
||||
if("file".equalsIgnoreCase(p.dataType))
|
||||
if("file".equalsIgnoreCase(((FormParameter)param).getType()))
|
||||
p.isFile = true;
|
||||
else
|
||||
p.notFile = true;
|
||||
|
||||
Reference in New Issue
Block a user