Skip to content

Commit 0cc5916

Browse files
committed
Server:完善 Rap 的文档接口 Demo
1 parent ddce040 commit 0cc5916

File tree

1 file changed

+158
-23
lines changed

1 file changed

+158
-23
lines changed

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

Lines changed: 158 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1178,7 +1178,7 @@ public String rapJoinedRepository() {
11781178
" \"name\": \"Test\",\n" +
11791179
" \"description\": \"4 test\",\n" +
11801180
" \"logo\": null,\n" +
1181-
" \"token\": \"JrA77ktHhrGJtlhtUwt4bpk3l96-QQLE\",\n" +
1181+
" \"token\": \"JrA78ktHhsGJtlhtUwt4Bpk3i96-QQLE\",\n" +
11821182
" \"visibility\": true,\n" +
11831183
" \"ownerId\": 1803,\n" +
11841184
" \"organizationId\": null,\n" +
@@ -1190,19 +1190,19 @@ public String rapJoinedRepository() {
11901190
" \"creator\": {\n" +
11911191
" \"id\": 1803,\n" +
11921192
" \"fullname\": \"TommyLemon\",\n" +
1193-
" \"email\": \"1184482681@qq.com\"\n" +
1193+
" \"email\": \"111@qq.com\"\n" +
11941194
" },\n" +
11951195
" \"owner\": {\n" +
11961196
" \"id\": 1803,\n" +
11971197
" \"fullname\": \"TommyLemon\",\n" +
1198-
" \"email\": \"1184482681@qq.com\"\n" +
1198+
" \"email\": \"111@qq.com\"\n" +
11991199
" },\n" +
12001200
" \"locker\": null,\n" +
12011201
" \"members\": [\n" +
12021202
" {\n" +
12031203
" \"id\": 1803,\n" +
12041204
" \"fullname\": \"TommyLemon\",\n" +
1205-
" \"email\": \"1184482681@qq.com\"\n" +
1205+
" \"email\": \"111@qq.com\"\n" +
12061206
" }\n" +
12071207
" ],\n" +
12081208
" \"organization\": null,\n" +
@@ -1224,13 +1224,13 @@ public String rapJoinedRepository() {
12241224
*/
12251225
@GetMapping("repository/get")
12261226
public String rapRepositoryDetail(@RequestParam("id") String id) {
1227-
return "{\n" +
1227+
return "{\n" +
12281228
" \"data\": {\n" +
1229-
" \"id\": 1243,\n" +
1229+
" \"id\": " + id + ",\n" +
12301230
" \"name\": \"Test\",\n" +
12311231
" \"description\": \"4 test\",\n" +
12321232
" \"logo\": null,\n" +
1233-
" \"token\": \"JrA77ktHhrGJtlhtUwt4bpk3l96-QQLE\",\n" +
1233+
" \"token\": \"JrA78ktHhsGJtlhtUwt4Bpk3i96-QQLE\",\n" +
12341234
" \"visibility\": true,\n" +
12351235
" \"ownerId\": 1803,\n" +
12361236
" \"organizationId\": null,\n" +
@@ -1242,19 +1242,19 @@ public String rapRepositoryDetail(@RequestParam("id") String id) {
12421242
" \"creator\": {\n" +
12431243
" \"id\": 1803,\n" +
12441244
" \"fullname\": \"TommyLemon\",\n" +
1245-
" \"email\": \"1184482681@qq.com\"\n" +
1245+
" \"email\": \"111@qq.com\"\n" +
12461246
" },\n" +
12471247
" \"owner\": {\n" +
12481248
" \"id\": 1803,\n" +
12491249
" \"fullname\": \"TommyLemon\",\n" +
1250-
" \"email\": \"1184482681@qq.com\"\n" +
1250+
" \"email\": \"111@qq.com\"\n" +
12511251
" },\n" +
12521252
" \"locker\": null,\n" +
12531253
" \"members\": [\n" +
12541254
" {\n" +
12551255
" \"id\": 1803,\n" +
12561256
" \"fullname\": \"TommyLemon\",\n" +
1257-
" \"email\": \"1184482681@qq.com\"\n" +
1257+
" \"email\": \"111@qq.com\"\n" +
12581258
" }\n" +
12591259
" ],\n" +
12601260
" \"organization\": null,\n" +
@@ -1274,7 +1274,7 @@ public String rapRepositoryDetail(@RequestParam("id") String id) {
12741274
" {\n" +
12751275
" \"id\": 4042,\n" +
12761276
" \"name\": \"getUser\",\n" +
1277-
" \"url\": \"http://39.108.143.172:8080/get\",\n" +
1277+
" \"url\": \"/get\",\n" +
12781278
" \"method\": \"POST\",\n" +
12791279
" \"description\": \"get an User\",\n" +
12801280
" \"priority\": 1,\n" +
@@ -1284,7 +1284,7 @@ public String rapRepositoryDetail(@RequestParam("id") String id) {
12841284
" \"moduleId\": 1973,\n" +
12851285
" \"repositoryId\": 1243,\n" +
12861286
" \"createdAt\": \"2017-12-05T08:51:02.000Z\",\n" +
1287-
" \"updatedAt\": \"2020-05-24T15:39:34.000Z\",\n" +
1287+
" \"updatedAt\": \"2020-05-30T16:25:28.000Z\",\n" +
12881288
" \"deletedAt\": null,\n" +
12891289
" \"locker\": null,\n" +
12901290
" \"properties\": [\n" +
@@ -1305,7 +1305,7 @@ public String rapRepositoryDetail(@RequestParam("id") String id) {
13051305
" \"repositoryId\": 1243,\n" +
13061306
" \"required\": false,\n" +
13071307
" \"createdAt\": \"2017-12-05T08:52:03.000Z\",\n" +
1308-
" \"updatedAt\": \"2020-05-24T15:39:50.000Z\",\n" +
1308+
" \"updatedAt\": \"2020-05-30T16:25:28.000Z\",\n" +
13091309
" \"deletedAt\": null\n" +
13101310
" },\n" +
13111311
" {\n" +
@@ -1325,7 +1325,27 @@ public String rapRepositoryDetail(@RequestParam("id") String id) {
13251325
" \"repositoryId\": 1243,\n" +
13261326
" \"required\": false,\n" +
13271327
" \"createdAt\": \"2017-12-05T08:54:16.000Z\",\n" +
1328-
" \"updatedAt\": \"2020-05-24T15:39:50.000Z\",\n" +
1328+
" \"updatedAt\": \"2020-05-30T16:25:28.000Z\",\n" +
1329+
" \"deletedAt\": null\n" +
1330+
" },\n" +
1331+
" {\n" +
1332+
" \"id\": 17621689,\n" +
1333+
" \"scope\": \"request\",\n" +
1334+
" \"type\": \"String\",\n" +
1335+
" \"pos\": 1,\n" +
1336+
" \"name\": \"site\",\n" +
1337+
" \"rule\": null,\n" +
1338+
" \"value\": \"apijson\",\n" +
1339+
" \"description\": \"来源网站\",\n" +
1340+
" \"parentId\": -1,\n" +
1341+
" \"priority\": 1590855928395,\n" +
1342+
" \"interfaceId\": 4042,\n" +
1343+
" \"creatorId\": 1803,\n" +
1344+
" \"moduleId\": 1973,\n" +
1345+
" \"repositoryId\": 1243,\n" +
1346+
" \"required\": false,\n" +
1347+
" \"createdAt\": \"2020-05-30T16:25:28.000Z\",\n" +
1348+
" \"updatedAt\": \"2020-05-30T16:25:28.000Z\",\n" +
13291349
" \"deletedAt\": null\n" +
13301350
" }\n" +
13311351
" ]\n" +
@@ -1339,24 +1359,20 @@ public String rapRepositoryDetail(@RequestParam("id") String id) {
13391359
" \"priority\": 2,\n" +
13401360
" \"status\": 200,\n" +
13411361
" \"creatorId\": 1803,\n" +
1342-
" \"lockerId\": 1803,\n" +
1362+
" \"lockerId\": null,\n" +
13431363
" \"moduleId\": 1973,\n" +
13441364
" \"repositoryId\": 1243,\n" +
13451365
" \"createdAt\": \"2020-01-13T10:32:51.000Z\",\n" +
1346-
" \"updatedAt\": \"2020-05-24T15:39:55.000Z\",\n" +
1366+
" \"updatedAt\": \"2020-05-30T16:29:13.000Z\",\n" +
13471367
" \"deletedAt\": null,\n" +
1348-
" \"locker\": {\n" +
1349-
" \"id\": 1803,\n" +
1350-
" \"fullname\": \"TommyLemon\",\n" +
1351-
" \"email\": \"[email protected]\"\n" +
1352-
" },\n" +
1368+
" \"locker\": null,\n" +
13531369
" \"properties\": [\n" +
13541370
" {\n" +
13551371
" \"id\": 17394319,\n" +
13561372
" \"scope\": \"request\",\n" +
13571373
" \"type\": \"String\",\n" +
13581374
" \"pos\": 1,\n" +
1359-
" \"name\": \"h\",\n" +
1375+
" \"name\": \"he\",\n" +
13601376
" \"rule\": null,\n" +
13611377
" \"value\": \"test\",\n" +
13621378
" \"description\": \"\",\n" +
@@ -1368,7 +1384,126 @@ public String rapRepositoryDetail(@RequestParam("id") String id) {
13681384
" \"repositoryId\": 1243,\n" +
13691385
" \"required\": false,\n" +
13701386
" \"createdAt\": \"2020-05-24T15:39:50.000Z\",\n" +
1371-
" \"updatedAt\": \"2020-05-24T15:39:50.000Z\",\n" +
1387+
" \"updatedAt\": \"2020-05-30T16:29:13.000Z\",\n" +
1388+
" \"deletedAt\": null\n" +
1389+
" }\n" +
1390+
" ]\n" +
1391+
" },\n" +
1392+
" {\n" +
1393+
" \"id\": 1596193,\n" +
1394+
" \"name\": \"login\",\n" +
1395+
" \"url\": \"/login\",\n" +
1396+
" \"method\": \"POST\",\n" +
1397+
" \"description\": \"\",\n" +
1398+
" \"priority\": 1590853798312,\n" +
1399+
" \"status\": 200,\n" +
1400+
" \"creatorId\": 1803,\n" +
1401+
" \"lockerId\": null,\n" +
1402+
" \"moduleId\": 1973,\n" +
1403+
" \"repositoryId\": 1243,\n" +
1404+
" \"createdAt\": \"2020-05-30T15:49:58.000Z\",\n" +
1405+
" \"updatedAt\": \"2020-05-30T16:25:08.000Z\",\n" +
1406+
" \"deletedAt\": null,\n" +
1407+
" \"locker\": null,\n" +
1408+
" \"properties\": [\n" +
1409+
" {\n" +
1410+
" \"id\": 17621552,\n" +
1411+
" \"scope\": \"request\",\n" +
1412+
" \"type\": \"String\",\n" +
1413+
" \"pos\": 3,\n" +
1414+
" \"name\": \"phone\",\n" +
1415+
" \"rule\": null,\n" +
1416+
" \"value\": \"13000082001\",\n" +
1417+
" \"description\": \"手机号\",\n" +
1418+
" \"parentId\": -1,\n" +
1419+
" \"priority\": 1590853936991,\n" +
1420+
" \"interfaceId\": 1596193,\n" +
1421+
" \"creatorId\": 1803,\n" +
1422+
" \"moduleId\": 1973,\n" +
1423+
" \"repositoryId\": 1243,\n" +
1424+
" \"required\": false,\n" +
1425+
" \"createdAt\": \"2020-05-30T15:52:16.000Z\",\n" +
1426+
" \"updatedAt\": \"2020-05-30T16:25:07.000Z\",\n" +
1427+
" \"deletedAt\": null\n" +
1428+
" },\n" +
1429+
" {\n" +
1430+
" \"id\": 17621553,\n" +
1431+
" \"scope\": \"request\",\n" +
1432+
" \"type\": \"String\",\n" +
1433+
" \"pos\": 3,\n" +
1434+
" \"name\": \"password\",\n" +
1435+
" \"rule\": null,\n" +
1436+
" \"value\": \"123456\",\n" +
1437+
" \"description\": \"密码\",\n" +
1438+
" \"parentId\": -1,\n" +
1439+
" \"priority\": 1590853936994,\n" +
1440+
" \"interfaceId\": 1596193,\n" +
1441+
" \"creatorId\": 1803,\n" +
1442+
" \"moduleId\": 1973,\n" +
1443+
" \"repositoryId\": 1243,\n" +
1444+
" \"required\": false,\n" +
1445+
" \"createdAt\": \"2020-05-30T15:52:16.000Z\",\n" +
1446+
" \"updatedAt\": \"2020-05-30T16:25:07.000Z\",\n" +
1447+
" \"deletedAt\": null\n" +
1448+
" },\n" +
1449+
" {\n" +
1450+
" \"id\": 17621554,\n" +
1451+
" \"scope\": \"response\",\n" +
1452+
" \"type\": \"String\",\n" +
1453+
" \"pos\": 3,\n" +
1454+
" \"name\": \"msg\",\n" +
1455+
" \"rule\": null,\n" +
1456+
" \"value\": \"\",\n" +
1457+
" \"description\": \"success\",\n" +
1458+
" \"parentId\": -1,\n" +
1459+
" \"priority\": 1590853936997,\n" +
1460+
" \"interfaceId\": 1596193,\n" +
1461+
" \"creatorId\": 1803,\n" +
1462+
" \"moduleId\": 1973,\n" +
1463+
" \"repositoryId\": 1243,\n" +
1464+
" \"required\": false,\n" +
1465+
" \"createdAt\": \"2020-05-30T15:52:16.000Z\",\n" +
1466+
" \"updatedAt\": \"2020-05-30T16:25:07.000Z\",\n" +
1467+
" \"deletedAt\": null\n" +
1468+
" },\n" +
1469+
" {\n" +
1470+
" \"id\": 17621565,\n" +
1471+
" \"scope\": \"response\",\n" +
1472+
" \"type\": \"Number\",\n" +
1473+
" \"pos\": 3,\n" +
1474+
" \"name\": \"code\",\n" +
1475+
" \"rule\": \"\",\n" +
1476+
" \"value\": \"200\",\n" +
1477+
" \"description\": null,\n" +
1478+
" \"parentId\": -1,\n" +
1479+
" \"priority\": 1590853937020,\n" +
1480+
" \"interfaceId\": 1596193,\n" +
1481+
" \"creatorId\": null,\n" +
1482+
" \"moduleId\": 1973,\n" +
1483+
" \"repositoryId\": 1243,\n" +
1484+
" \"required\": false,\n" +
1485+
" \"createdAt\": \"2020-05-30T15:52:17.000Z\",\n" +
1486+
" \"updatedAt\": \"2020-05-30T16:25:07.000Z\",\n" +
1487+
" \"deletedAt\": null\n" +
1488+
" },\n" +
1489+
" {\n" +
1490+
" \"id\": 17621688,\n" +
1491+
" \"scope\": \"request\",\n" +
1492+
" \"type\": \"String\",\n" +
1493+
" \"pos\": 1,\n" +
1494+
" \"name\": \"head\",\n" +
1495+
" \"rule\": null,\n" +
1496+
" \"value\": \"apijson\",\n" +
1497+
" \"description\": \"请求头\",\n" +
1498+
" \"parentId\": -1,\n" +
1499+
" \"priority\": 1590855907992,\n" +
1500+
" \"interfaceId\": 1596193,\n" +
1501+
" \"creatorId\": 1803,\n" +
1502+
" \"moduleId\": 1973,\n" +
1503+
" \"repositoryId\": 1243,\n" +
1504+
" \"required\": false,\n" +
1505+
" \"createdAt\": \"2020-05-30T16:25:07.000Z\",\n" +
1506+
" \"updatedAt\": \"2020-05-30T16:25:07.000Z\",\n" +
13721507
" \"deletedAt\": null\n" +
13731508
" }\n" +
13741509
" ]\n" +

0 commit comments

Comments
 (0)