use of info.xiancloud.apidoc.handler.UnitMdBuilderHandler 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();
}
Aggregations