forked from loafle/openapi-generator-original
minor code formatting fix
This commit is contained in:
parent
dabe6b5961
commit
d6c95226c7
@ -2278,8 +2278,7 @@ public class DefaultCodegen {
|
|||||||
} else if (param instanceof BodyParameter) {
|
} else if (param instanceof BodyParameter) {
|
||||||
bodyParam = p;
|
bodyParam = p;
|
||||||
bodyParams.add(p.copy());
|
bodyParams.add(p.copy());
|
||||||
if(definitions != null)
|
if(definitions != null) {
|
||||||
{
|
|
||||||
op.requestBodyExamples = new ExampleGenerator(definitions).generate(null, operation.getConsumes(), bodyParam.dataType);
|
op.requestBodyExamples = new ExampleGenerator(definitions).generate(null, operation.getConsumes(), bodyParam.dataType);
|
||||||
}
|
}
|
||||||
} else if (param instanceof FormParameter) {
|
} else if (param instanceof FormParameter) {
|
||||||
@ -2290,11 +2289,13 @@ public class DefaultCodegen {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (String i : imports) {
|
for (String i : imports) {
|
||||||
if (needToImport(i)) {
|
if (needToImport(i)) {
|
||||||
op.imports.add(i);
|
op.imports.add(i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
op.bodyParam = bodyParam;
|
op.bodyParam = bodyParam;
|
||||||
op.httpMethod = httpMethod.toUpperCase();
|
op.httpMethod = httpMethod.toUpperCase();
|
||||||
|
|
||||||
@ -2309,6 +2310,7 @@ public class DefaultCodegen {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
op.allParams = addHasMore(allParams);
|
op.allParams = addHasMore(allParams);
|
||||||
op.bodyParams = addHasMore(bodyParams);
|
op.bodyParams = addHasMore(bodyParams);
|
||||||
op.pathParams = addHasMore(pathParams);
|
op.pathParams = addHasMore(pathParams);
|
||||||
@ -2316,13 +2318,13 @@ public class DefaultCodegen {
|
|||||||
op.headerParams = addHasMore(headerParams);
|
op.headerParams = addHasMore(headerParams);
|
||||||
// op.cookieParams = cookieParams;
|
// op.cookieParams = cookieParams;
|
||||||
op.formParams = addHasMore(formParams);
|
op.formParams = addHasMore(formParams);
|
||||||
|
op.externalDocs = operation.getExternalDocs();
|
||||||
// legacy support
|
// legacy support
|
||||||
op.nickname = op.operationId;
|
op.nickname = op.operationId;
|
||||||
|
|
||||||
if (op.allParams.size() > 0) {
|
if (op.allParams.size() > 0) {
|
||||||
op.hasParams = true;
|
op.hasParams = true;
|
||||||
}
|
}
|
||||||
op.externalDocs = operation.getExternalDocs();
|
|
||||||
|
|
||||||
// set Restful Flag
|
// set Restful Flag
|
||||||
op.isRestfulShow = op.isRestfulShow();
|
op.isRestfulShow = op.isRestfulShow();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user