protected void processOperation(ApiMetadataContext context, Map<Class<?>, ClassDoc> docs, MApiOperationBuilder o) {
ReflectMethod method = o.getRoute().getAction().getMethod();
if(null != method) {
ClassDoc cdoc = resolveClassDoc(docs, method.getDeclaringClass(), false);
MethodDoc mdoc = cdoc.methods.get(method.getName());
if(null != mdoc) {
if(!Strings.isEmpty(mdoc.description)) {
o.setDescription(mdoc.description);
}
if(!Strings.isEmpty(mdoc.response)) {
for(MApiResponseBuilder resp : o.getResponses()) {
if(resp.getStatus() >= 200 && resp.getStatus() < 300) {
resp.setDescription(mdoc.response);
break;
}
}
}
o.getParameters().forEach((param) -> processParameter(context, docs, mdoc, param, method));
}
}
}