ReturnType processing has been fixed

This commit is contained in:
Nadezhda Makarkina
2015-10-16 16:40:01 +03:00
parent 6b7ceab081
commit c298b7d152
3 changed files with 8 additions and 8 deletions

View File

@@ -12,7 +12,8 @@ public class CodegenOperation {
public final List<CodegenProperty> responseHeaders = new ArrayList<CodegenProperty>();
public Boolean hasAuthMethods, hasConsumes, hasProduces, hasParams, returnTypeIsPrimitive,
returnSimpleType, subresourceOperation, isMapContainer, isListContainer,
hasMore = Boolean.TRUE, isMultipart, isResponseBinary = Boolean.FALSE;
hasMore = Boolean.TRUE, isMultipart, isResponseBinary = Boolean.FALSE,
hasReference = Boolean.FALSE;
public String path, operationId, returnType, httpMethod, returnBaseType,
returnContainer, summary, notes, baseName, defaultResponse;
public List<Map<String, String>> consumes, produces;

View File

@@ -1017,6 +1017,7 @@ public class DefaultCodegen {
op.examples = new ExampleGenerator(definitions).generate(methodResponse.getExamples(), operation.getProduces(), responseProperty);
op.defaultResponse = toDefaultValue(responseProperty);
op.returnType = cm.datatype;
op.hasReference = definitions != null && definitions.containsKey(op.returnBaseType);
if (cm.isContainer != null) {
op.returnContainer = cm.containerType;
if ("map".equals(cm.containerType)) {