Skip to content

Commit f21b103

Browse files
committed
接口同步
1 parent 1baef62 commit f21b103

File tree

17 files changed

+1901
-5
lines changed

17 files changed

+1901
-5
lines changed

apidoc-core/pom.xml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,6 @@
3131
<artifactId>jackson-core</artifactId>
3232
<version>2.9.9</version>
3333
</dependency>
34-
<dependency>
35-
<groupId>org.apache.commons</groupId>
36-
<artifactId>commons-lang3</artifactId>
37-
<version>3.8.1</version>
38-
</dependency>
3934
<dependency>
4035
<groupId>com.fasterxml.jackson.dataformat</groupId>
4136
<artifactId>jackson-dataformat-yaml</artifactId>

apidoc-yapi-plugin/pom.xml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xmlns="http://maven.apache.org/POM/4.0.0"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<parent>
6+
<artifactId>apidoc</artifactId>
7+
<groupId>com.ztianzeng.apidoc</groupId>
8+
<version>0.02-SNAPSHOT</version>
9+
</parent>
10+
<modelVersion>4.0.0</modelVersion>
11+
12+
<artifactId>apidoc-yapi-plugin</artifactId>
13+
14+
<dependencies>
15+
<dependency>
16+
<groupId>com.ztianzeng.apidoc</groupId>
17+
<artifactId>apidoc-core</artifactId>
18+
<version>0.02-SNAPSHOT</version>
19+
</dependency>
20+
<dependency>
21+
<groupId>org.apache.httpcomponents</groupId>
22+
<artifactId>httpclient</artifactId>
23+
<version>4.5.8</version>
24+
</dependency>
25+
</dependencies>
26+
</project>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package com.ztianzeng.apidoc.yapi.constant;
2+
3+
/**
4+
* 项目类型
5+
*
6+
* @author chengsheng@qbb6.com
7+
* @date 2019/1/31 5:16 PM
8+
*/
9+
public interface ProjectTypeConstant {
10+
/**
11+
* api 项目
12+
*/
13+
String api = "api";
14+
}
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
package com.ztianzeng.apidoc.yapi.constant;
2+
3+
/**
4+
* yapi 接口
5+
*
6+
* @author chengsheng@qbb6.com
7+
* @date 2019/1/31 3:29 PM
8+
*/
9+
public interface YapiConstant {
10+
/**
11+
* 目录
12+
*/
13+
String menu = "tool-temp";
14+
15+
/**
16+
* yapi 地址
17+
*/
18+
String yapiAddress = "http://47.96.254.39:3000";
19+
/**
20+
* 新增或者更新接口
21+
*/
22+
String yapiSave = "/api/interface/save";
23+
/**
24+
* 获取接口菜单列表
25+
*/
26+
String yapiListMenu = "/api/interface/list_menu";
27+
/**
28+
* 更新接口
29+
*/
30+
String yapiUp = "/api/interface/up";
31+
/**
32+
* 获取接口列表数据
33+
*/
34+
String yapiList = "/api/interface/list";
35+
/**
36+
* 新增接口
37+
*/
38+
String yapiAdd = "/api/interface/add";
39+
/**
40+
* 新增接口分类
41+
*/
42+
String yapiAddCat = "/api/interface/add_cat";
43+
/**
44+
* 获取接口数据
45+
*/
46+
String yapiGet = "/api/interface/get";
47+
48+
/**
49+
* 获取菜单列表
50+
*/
51+
String yapiCatMenu = "/api/interface/getCatMenu";
52+
}
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
package com.ztianzeng.apidoc.yapi.module;
2+
3+
import lombok.Data;
4+
5+
import java.io.Serializable;
6+
import java.util.List;
7+
import java.util.Map;
8+
9+
/**
10+
* yapi dto
11+
*
12+
* @author chengsheng@qbb6.com
13+
* @date 2019/2/11 3:16 PM
14+
*/
15+
@Data
16+
public class YapiApiDTO implements Serializable {
17+
/**
18+
* 路径
19+
*/
20+
private String path;
21+
/**
22+
* 请求参数
23+
*/
24+
private List<YapiQueryDTO> params;
25+
/**
26+
* 头信息
27+
*/
28+
private List header;
29+
/**
30+
* title
31+
*/
32+
private String title;
33+
/**
34+
* 响应
35+
*/
36+
private String response;
37+
/**
38+
* 请求体
39+
*/
40+
private String requestBody;
41+
42+
/**
43+
* 请求方法
44+
*/
45+
private String method = "POST";
46+
47+
/**
48+
* 请求 类型 raw,form,json
49+
*/
50+
private String req_body_type;
51+
/**
52+
* 请求form
53+
*/
54+
private List<Map<String, String>> req_body_form;
55+
56+
/**
57+
* 描述
58+
*/
59+
private String desc;
60+
/**
61+
* 菜单
62+
*/
63+
private String menu;
64+
65+
/**
66+
* 请求参数
67+
*/
68+
private List req_params;
69+
70+
71+
public YapiApiDTO() {
72+
}
73+
74+
75+
}
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
package com.ztianzeng.apidoc.yapi.module;
2+
3+
4+
import com.ztianzeng.apidoc.yapi.constant.YapiConstant;
5+
import org.apache.commons.lang3.StringUtils;
6+
7+
import java.io.Serializable;
8+
9+
/**
10+
* 新增菜单
11+
*
12+
* @author chengsheng@qbb6.com
13+
* @date 2019/2/1 10:44 AM
14+
*/
15+
public class YapiCatMenuParam implements Serializable {
16+
/**
17+
* 描述
18+
*/
19+
private String desc = "工具上传临时文件夹";
20+
/**
21+
* 名字
22+
*/
23+
private String name;
24+
/**
25+
* 项目id
26+
*/
27+
private Integer project_id;
28+
/**
29+
* token
30+
*/
31+
private String token;
32+
33+
34+
public YapiCatMenuParam() {
35+
}
36+
37+
public YapiCatMenuParam(String desc, String name, Integer project_id, String token) {
38+
this.desc = desc;
39+
this.name = name;
40+
this.project_id = project_id;
41+
this.token = token;
42+
}
43+
44+
public YapiCatMenuParam(Integer project_id, String token) {
45+
this.project_id = project_id;
46+
this.token = token;
47+
}
48+
49+
public YapiCatMenuParam(String name, Integer project_id, String token) {
50+
this.name = name;
51+
this.project_id = project_id;
52+
this.token = token;
53+
if (StringUtils.isNotEmpty(name)) {
54+
this.name = YapiConstant.menu;
55+
}
56+
}
57+
58+
public String getDesc() {
59+
return desc;
60+
}
61+
62+
public void setDesc(String desc) {
63+
this.desc = desc;
64+
}
65+
66+
public String getName() {
67+
return name;
68+
}
69+
70+
public void setName(String name) {
71+
this.name = name;
72+
}
73+
74+
public Integer getProject_id() {
75+
return project_id;
76+
}
77+
78+
public void setProject_id(Integer project_id) {
79+
this.project_id = project_id;
80+
}
81+
82+
public String getToken() {
83+
return token;
84+
}
85+
86+
public void setToken(String token) {
87+
this.token = token;
88+
}
89+
}
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
package com.ztianzeng.apidoc.yapi.module;
2+
3+
import java.io.Serializable;
4+
5+
/**
6+
* 分类列表
7+
*
8+
* @author chengsheng@qbb6.com
9+
* @date 2019/2/1 10:30 AM
10+
*/
11+
public class YapiCatResponse implements Serializable {
12+
/**
13+
* id
14+
*/
15+
private Integer _id;
16+
/**
17+
* 名称
18+
*/
19+
private String name;
20+
/**
21+
* 项目id
22+
*/
23+
private Integer project_id;
24+
/**
25+
* 描述
26+
*/
27+
private String desc;
28+
/**
29+
* uid
30+
*/
31+
private Integer uid;
32+
/**
33+
* 排序
34+
*/
35+
private Integer index;
36+
37+
38+
public Integer get_id() {
39+
return _id;
40+
}
41+
42+
public void set_id(Integer _id) {
43+
this._id = _id;
44+
}
45+
46+
public String getName() {
47+
return name;
48+
}
49+
50+
public void setName(String name) {
51+
this.name = name;
52+
}
53+
54+
public Integer getProject_id() {
55+
return project_id;
56+
}
57+
58+
public void setProject_id(Integer project_id) {
59+
this.project_id = project_id;
60+
}
61+
62+
public String getDesc() {
63+
return desc;
64+
}
65+
66+
public void setDesc(String desc) {
67+
this.desc = desc;
68+
}
69+
70+
public Integer getUid() {
71+
return uid;
72+
}
73+
74+
public void setUid(Integer uid) {
75+
this.uid = uid;
76+
}
77+
78+
public Integer getIndex() {
79+
return index;
80+
}
81+
82+
public void setIndex(Integer index) {
83+
this.index = index;
84+
}
85+
}

0 commit comments

Comments
 (0)