@Override protected Annotation getApiOperationAnnotation() { ConstPool constPool = getCtClass().getClassFile().getConstPool(); EntityNodePath path = getResourcePath().getNodePath(); EntityMetaData metaData = path.get(path.size() - 1).getEntityMetaData(); Annotation annotation = new Annotation(ApiOperation.class.getCanonicalName(), constPool); annotation.addMemberValue( "value", new StringMemberValue("Search " + metaData.getName(), constPool)); annotation.addMemberValue( "response", new ClassMemberValue(metaData.getEntityClass().getCanonicalName(), constPool)); annotation.addMemberValue("responseContainer", new StringMemberValue("List", constPool)); return annotation; }
@Override protected List<Annotation> getApiResponseAnnotations() { EntityNodePath path = getResourcePath().getNodePath(); EntityMetaData metaData = path.get(path.size() - 1).getEntityMetaData(); return Lists.newArrayList(getOkResponseAnnotation(metaData.getEntityClass())); }