|
@@ -23,38 +23,38 @@ smart-doc就能帮你生成一个简易明了的Markdown、HTML5、Postman Colle
|
|
|
2.在web项目的src/main/resource目录下添加smart-doc.json文件
|
|
|
文件内容(文件内容根据自己的项目做配置)
|
|
|
{
|
|
|
- "outPath":"./src/main/resources/static/doc",
|
|
|
- "serverUrl": "http://127.0.0.1:8082/test",
|
|
|
+ "outPath":"./src/main/resources/static/doc",//文档输出路径
|
|
|
+ "serverUrl": "http://127.0.0.1:8082/test",//接口url
|
|
|
"isStrict": false,
|
|
|
- "coverOld": true,
|
|
|
- "allInOne": true,
|
|
|
- "packageFilters": "com.bizmatics.demo.controller.web",
|
|
|
- "requestExample":"false",
|
|
|
- "responseExample":"true",
|
|
|
- "projectName": "test"
|
|
|
+ "coverOld": true,//覆盖以前的文档
|
|
|
+ "allInOne": true,//是否合并
|
|
|
+ "packageFilters": "com.bizmatics.demo.controller.web"//扫描的接口路径
|
|
|
+ "requestExample":"false",//请求示例关闭
|
|
|
+ "responseExample":"true",//相应示例开启
|
|
|
+ "projectName": "test"//项目名称
|
|
|
}
|
|
|
3.生成文档
|
|
|
-1.点击idea左侧的maven导航栏选择smart-doc,生成合适的文档工具
|
|
|
-2.指令
|
|
|
-//生成html
|
|
|
-mvn -Dfile.encoding=UTF-8 smart-doc:html
|
|
|
-//生成markdown
|
|
|
-mvn -Dfile.encoding=UTF-8 smart-doc:markdown
|
|
|
-//生成adoc
|
|
|
-mvn -Dfile.encoding=UTF-8 smart-doc:adoc
|
|
|
-//生成postman json数据
|
|
|
-mvn -Dfile.encoding=UTF-8 smart-doc:postman
|
|
|
-// 生成 Open Api 3.0+,Since smart-doc-maven-plugin 1.1.5
|
|
|
-mvn -Dfile.encoding=UTF-8 smart-doc:openapi
|
|
|
-// 生成文档推送到Torna平台
|
|
|
-mvn -Dfile.encoding=UTF-8 smart-doc:torna-rest
|
|
|
-// Apache Dubbo RPC文档
|
|
|
-// Generate html
|
|
|
-mvn -Dfile.encoding=UTF-8 smart-doc:rpc-html
|
|
|
-// Generate markdown
|
|
|
-mvn -Dfile.encoding=UTF-8 smart-doc:rpc-markdown
|
|
|
-// Generate adoc
|
|
|
-mvn -Dfile.encoding=UTF-8 smart-doc:rpc-adoc
|
|
|
+ 1.点击idea左侧的maven导航栏选择smart-doc,生成合适的文档工具
|
|
|
+ 2.指令
|
|
|
+ //生成html
|
|
|
+ mvn -Dfile.encoding=UTF-8 smart-doc:html
|
|
|
+ //生成markdown
|
|
|
+ mvn -Dfile.encoding=UTF-8 smart-doc:markdown
|
|
|
+ //生成adoc
|
|
|
+ mvn -Dfile.encoding=UTF-8 smart-doc:adoc
|
|
|
+ //生成postman json数据
|
|
|
+ mvn -Dfile.encoding=UTF-8 smart-doc:postman
|
|
|
+ // 生成 Open Api 3.0+,Since smart-doc-maven-plugin 1.1.5
|
|
|
+ mvn -Dfile.encoding=UTF-8 smart-doc:openapi
|
|
|
+ // 生成文档推送到Torna平台
|
|
|
+ mvn -Dfile.encoding=UTF-8 smart-doc:torna-rest
|
|
|
+ // Apache Dubbo RPC文档
|
|
|
+ // Generate html
|
|
|
+ mvn -Dfile.encoding=UTF-8 smart-doc:rpc-html
|
|
|
+ // Generate markdown
|
|
|
+ mvn -Dfile.encoding=UTF-8 smart-doc:rpc-markdown
|
|
|
+ // Generate adoc
|
|
|
+ mvn -Dfile.encoding=UTF-8 smart-doc:rpc-adoc
|
|
|
4.示例项目在git上的demo项目里面
|
|
|
5. 官网地址
|
|
|
https://gitee.com/smart-doc-team/smart-doc?_from=gitee_search
|