Skip to content

Commit

Permalink
minor code formatting fix
Browse files Browse the repository at this point in the history
  • Loading branch information
wing328 committed Aug 19, 2017
1 parent dabe6b5 commit d6c9522
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2278,8 +2278,7 @@ public CodegenOperation fromOperation(String path,
} else if (param instanceof BodyParameter) {
bodyParam = p;
bodyParams.add(p.copy());
if(definitions != null)
{
if(definitions != null) {
op.requestBodyExamples = new ExampleGenerator(definitions).generate(null, operation.getConsumes(), bodyParam.dataType);
}
} else if (param instanceof FormParameter) {
Expand All @@ -2290,11 +2289,13 @@ public CodegenOperation fromOperation(String path,
}
}
}

for (String i : imports) {
if (needToImport(i)) {
op.imports.add(i);
}
}

op.bodyParam = bodyParam;
op.httpMethod = httpMethod.toUpperCase();

Expand All @@ -2309,20 +2310,21 @@ public int compare(CodegenParameter one, CodegenParameter another) {
}
});
}

op.allParams = addHasMore(allParams);
op.bodyParams = addHasMore(bodyParams);
op.pathParams = addHasMore(pathParams);
op.queryParams = addHasMore(queryParams);
op.headerParams = addHasMore(headerParams);
// op.cookieParams = cookieParams;
op.formParams = addHasMore(formParams);
op.externalDocs = operation.getExternalDocs();
// legacy support
op.nickname = op.operationId;

if (op.allParams.size() > 0) {
op.hasParams = true;
}
op.externalDocs = operation.getExternalDocs();

// set Restful Flag
op.isRestfulShow = op.isRestfulShow();
Expand Down

0 comments on commit d6c9522

Please sign in to comment.