use of info.xiancloud.apidoc.handler.filter.IUnitFilter in project xian by happyyangyuan.
the class CustomizedMdApidocUnit method getFilter.
@Override
protected IUnitFilter getFilter(UnitRequest msg) {
IUnitFilter filter = new FilterByUnits();
String unitFilter = msg.getString("unitFilter");
if (!StringUtil.isEmpty(unitFilter)) {
String[] fullNameArr = unitFilter.split(",");
filter.setValues(Arrays.asList(fullNameArr));
}
return filter;
}
use of info.xiancloud.apidoc.handler.filter.IUnitFilter in project xian by happyyangyuan.
the class AbstractMdApidocUnit method specifyBuild.
/**
* 返回生成MD的文件字符串
*/
private static String specifyBuild(String description, String docName, IUnitFilter filter) {
ByteArrayOutputStream bos = new ByteArrayOutputStream();
ApiBuilder.build(new UnitMdBuilderHandler(description, docName, filter).callback(data -> {
try {
bos.write(data);
if (data.length > 0) {
LOG.info("api-doc接口文档unit文档大小 : " + data.length);
LOG.info("api-doc接口文档unit发布成功");
} else {
LOG.info("api-doc接口文档unit暂无扫描到相关数据");
}
} catch (Exception e) {
LOG.error("api-doc接口文档生成unit接口文档出错", e);
}
}));
return bos.toString();
}
use of info.xiancloud.apidoc.handler.filter.IUnitFilter in project xian by happyyangyuan.
the class GroupMdApidocUnit method getFilter.
@Override
protected IUnitFilter getFilter(UnitRequest request) {
IUnitFilter filter = new FilterByGroups();
filter.setValues(new ArrayList<String>() {
{
add(request.getString("groupName"));
}
});
return filter;
}
Aggregations