Skip to content

Commit ddce040

Browse files
committed
Server:新增 Rap 的文档接口 Demo
1 parent 0a24a0e commit ddce040

File tree

1 file changed

+216
-0
lines changed

1 file changed

+216
-0
lines changed

APIJSON-Java-Server/APIJSONBoot/src/main/java/apijson/boot/DemoController.java

Lines changed: 216 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1166,6 +1166,222 @@ public String swaggerAPIDocs() {
11661166
"}";
11671167
}
11681168

1169+
/**Rap 文档 Demo,供 APIAuto 测试导入 Rap 文档到数据库用
1170+
* @return
1171+
*/
1172+
@GetMapping("repository/joined")
1173+
public String rapJoinedRepository() {
1174+
return "{\n" +
1175+
" \"data\": [\n" +
1176+
" {\n" +
1177+
" \"id\": 1243,\n" +
1178+
" \"name\": \"Test\",\n" +
1179+
" \"description\": \"4 test\",\n" +
1180+
" \"logo\": null,\n" +
1181+
" \"token\": \"JrA77ktHhrGJtlhtUwt4bpk3l96-QQLE\",\n" +
1182+
" \"visibility\": true,\n" +
1183+
" \"ownerId\": 1803,\n" +
1184+
" \"organizationId\": null,\n" +
1185+
" \"creatorId\": 1803,\n" +
1186+
" \"lockerId\": null,\n" +
1187+
" \"createdAt\": \"2017-12-05T08:48:44.000Z\",\n" +
1188+
" \"updatedAt\": \"2019-12-30T02:36:48.000Z\",\n" +
1189+
" \"deletedAt\": null,\n" +
1190+
" \"creator\": {\n" +
1191+
" \"id\": 1803,\n" +
1192+
" \"fullname\": \"TommyLemon\",\n" +
1193+
" \"email\": \"[email protected]\"\n" +
1194+
" },\n" +
1195+
" \"owner\": {\n" +
1196+
" \"id\": 1803,\n" +
1197+
" \"fullname\": \"TommyLemon\",\n" +
1198+
" \"email\": \"[email protected]\"\n" +
1199+
" },\n" +
1200+
" \"locker\": null,\n" +
1201+
" \"members\": [\n" +
1202+
" {\n" +
1203+
" \"id\": 1803,\n" +
1204+
" \"fullname\": \"TommyLemon\",\n" +
1205+
" \"email\": \"[email protected]\"\n" +
1206+
" }\n" +
1207+
" ],\n" +
1208+
" \"organization\": null,\n" +
1209+
" \"collaborators\": [],\n" +
1210+
" \"RepositoriesMembers\": {\n" +
1211+
" \"userId\": 1803,\n" +
1212+
" \"repositoryId\": 1243\n" +
1213+
" },\n" +
1214+
" \"canUserEdit\": true\n" +
1215+
" }\n" +
1216+
" ]\n" +
1217+
"}";
1218+
}
1219+
1220+
1221+
/**Rap 文档 Demo,供 APIAuto 测试导入 Rap 文档到数据库用
1222+
* @param id
1223+
* @return
1224+
*/
1225+
@GetMapping("repository/get")
1226+
public String rapRepositoryDetail(@RequestParam("id") String id) {
1227+
return "{\n" +
1228+
" \"data\": {\n" +
1229+
" \"id\": 1243,\n" +
1230+
" \"name\": \"Test\",\n" +
1231+
" \"description\": \"4 test\",\n" +
1232+
" \"logo\": null,\n" +
1233+
" \"token\": \"JrA77ktHhrGJtlhtUwt4bpk3l96-QQLE\",\n" +
1234+
" \"visibility\": true,\n" +
1235+
" \"ownerId\": 1803,\n" +
1236+
" \"organizationId\": null,\n" +
1237+
" \"creatorId\": 1803,\n" +
1238+
" \"lockerId\": null,\n" +
1239+
" \"createdAt\": \"2017-12-05T08:48:44.000Z\",\n" +
1240+
" \"updatedAt\": \"2019-12-30T02:36:48.000Z\",\n" +
1241+
" \"deletedAt\": null,\n" +
1242+
" \"creator\": {\n" +
1243+
" \"id\": 1803,\n" +
1244+
" \"fullname\": \"TommyLemon\",\n" +
1245+
" \"email\": \"[email protected]\"\n" +
1246+
" },\n" +
1247+
" \"owner\": {\n" +
1248+
" \"id\": 1803,\n" +
1249+
" \"fullname\": \"TommyLemon\",\n" +
1250+
" \"email\": \"[email protected]\"\n" +
1251+
" },\n" +
1252+
" \"locker\": null,\n" +
1253+
" \"members\": [\n" +
1254+
" {\n" +
1255+
" \"id\": 1803,\n" +
1256+
" \"fullname\": \"TommyLemon\",\n" +
1257+
" \"email\": \"[email protected]\"\n" +
1258+
" }\n" +
1259+
" ],\n" +
1260+
" \"organization\": null,\n" +
1261+
" \"collaborators\": [],\n" +
1262+
" \"modules\": [\n" +
1263+
" {\n" +
1264+
" \"id\": 1973,\n" +
1265+
" \"name\": \"示例模块\",\n" +
1266+
" \"description\": \"示例模块\",\n" +
1267+
" \"priority\": 1,\n" +
1268+
" \"creatorId\": 1803,\n" +
1269+
" \"repositoryId\": 1243,\n" +
1270+
" \"createdAt\": \"2017-12-05T08:48:44.000Z\",\n" +
1271+
" \"updatedAt\": \"2017-12-05T08:48:44.000Z\",\n" +
1272+
" \"deletedAt\": null,\n" +
1273+
" \"interfaces\": [\n" +
1274+
" {\n" +
1275+
" \"id\": 4042,\n" +
1276+
" \"name\": \"getUser\",\n" +
1277+
" \"url\": \"http://39.108.143.172:8080/get\",\n" +
1278+
" \"method\": \"POST\",\n" +
1279+
" \"description\": \"get an User\",\n" +
1280+
" \"priority\": 1,\n" +
1281+
" \"status\": 200,\n" +
1282+
" \"creatorId\": 1803,\n" +
1283+
" \"lockerId\": null,\n" +
1284+
" \"moduleId\": 1973,\n" +
1285+
" \"repositoryId\": 1243,\n" +
1286+
" \"createdAt\": \"2017-12-05T08:51:02.000Z\",\n" +
1287+
" \"updatedAt\": \"2020-05-24T15:39:34.000Z\",\n" +
1288+
" \"deletedAt\": null,\n" +
1289+
" \"locker\": null,\n" +
1290+
" \"properties\": [\n" +
1291+
" {\n" +
1292+
" \"id\": 81553,\n" +
1293+
" \"scope\": \"request\",\n" +
1294+
" \"type\": \"Object\",\n" +
1295+
" \"pos\": 2,\n" +
1296+
" \"name\": \"User\",\n" +
1297+
" \"rule\": \"\",\n" +
1298+
" \"value\": \"{}\",\n" +
1299+
" \"description\": \"\",\n" +
1300+
" \"parentId\": -1,\n" +
1301+
" \"priority\": 43204,\n" +
1302+
" \"interfaceId\": 4042,\n" +
1303+
" \"creatorId\": 1803,\n" +
1304+
" \"moduleId\": 1973,\n" +
1305+
" \"repositoryId\": 1243,\n" +
1306+
" \"required\": false,\n" +
1307+
" \"createdAt\": \"2017-12-05T08:52:03.000Z\",\n" +
1308+
" \"updatedAt\": \"2020-05-24T15:39:50.000Z\",\n" +
1309+
" \"deletedAt\": null\n" +
1310+
" },\n" +
1311+
" {\n" +
1312+
" \"id\": 81562,\n" +
1313+
" \"scope\": \"response\",\n" +
1314+
" \"type\": \"Object\",\n" +
1315+
" \"pos\": 2,\n" +
1316+
" \"name\": \"User\",\n" +
1317+
" \"rule\": \"\",\n" +
1318+
" \"value\": \"{\\n\\\"id\\\": 38710 ,\\n\\\"sex\\\": 0 ,\\n\\\"name\\\": \\\"TommyLemon\\\" ,\\n\\\"contactIdList\\\": [\\n82003 ,\\n82005 ,\\n90814 \\n],\\n\\\"pictureList\\\": [\\n\\\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\\\" \\n]\\n}\",\n" +
1319+
" \"description\": \"\",\n" +
1320+
" \"parentId\": -1,\n" +
1321+
" \"priority\": 1,\n" +
1322+
" \"interfaceId\": 4042,\n" +
1323+
" \"creatorId\": 1803,\n" +
1324+
" \"moduleId\": 1973,\n" +
1325+
" \"repositoryId\": 1243,\n" +
1326+
" \"required\": false,\n" +
1327+
" \"createdAt\": \"2017-12-05T08:54:16.000Z\",\n" +
1328+
" \"updatedAt\": \"2020-05-24T15:39:50.000Z\",\n" +
1329+
" \"deletedAt\": null\n" +
1330+
" }\n" +
1331+
" ]\n" +
1332+
" },\n" +
1333+
" {\n" +
1334+
" \"id\": 1446108,\n" +
1335+
" \"name\": \"post\",\n" +
1336+
" \"url\": \"/post\",\n" +
1337+
" \"method\": \"POST\",\n" +
1338+
" \"description\": \"post user\",\n" +
1339+
" \"priority\": 2,\n" +
1340+
" \"status\": 200,\n" +
1341+
" \"creatorId\": 1803,\n" +
1342+
" \"lockerId\": 1803,\n" +
1343+
" \"moduleId\": 1973,\n" +
1344+
" \"repositoryId\": 1243,\n" +
1345+
" \"createdAt\": \"2020-01-13T10:32:51.000Z\",\n" +
1346+
" \"updatedAt\": \"2020-05-24T15:39:55.000Z\",\n" +
1347+
" \"deletedAt\": null,\n" +
1348+
" \"locker\": {\n" +
1349+
" \"id\": 1803,\n" +
1350+
" \"fullname\": \"TommyLemon\",\n" +
1351+
" \"email\": \"[email protected]\"\n" +
1352+
" },\n" +
1353+
" \"properties\": [\n" +
1354+
" {\n" +
1355+
" \"id\": 17394319,\n" +
1356+
" \"scope\": \"request\",\n" +
1357+
" \"type\": \"String\",\n" +
1358+
" \"pos\": 1,\n" +
1359+
" \"name\": \"h\",\n" +
1360+
" \"rule\": null,\n" +
1361+
" \"value\": \"test\",\n" +
1362+
" \"description\": \"\",\n" +
1363+
" \"parentId\": -1,\n" +
1364+
" \"priority\": 1590334790882,\n" +
1365+
" \"interfaceId\": 1446108,\n" +
1366+
" \"creatorId\": 1803,\n" +
1367+
" \"moduleId\": 1973,\n" +
1368+
" \"repositoryId\": 1243,\n" +
1369+
" \"required\": false,\n" +
1370+
" \"createdAt\": \"2020-05-24T15:39:50.000Z\",\n" +
1371+
" \"updatedAt\": \"2020-05-24T15:39:50.000Z\",\n" +
1372+
" \"deletedAt\": null\n" +
1373+
" }\n" +
1374+
" ]\n" +
1375+
" }\n" +
1376+
" ]\n" +
1377+
" }\n" +
1378+
" ],\n" +
1379+
" \"canUserEdit\": true\n" +
1380+
" }\n" +
1381+
"}";
1382+
}
1383+
1384+
11691385

11701386

11711387

0 commit comments

Comments
 (0)