w-web-api 1.0.11 → 1.0.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,12 +1,13 @@
1
1
  import map from 'lodash/map'
2
2
  import keys from 'lodash/keys'
3
- import get from 'lodash/get'
3
+ // import get from 'lodash/get'
4
4
  import genID from 'wsemi/src/genID.mjs'
5
5
  import dtmapping from 'wsemi/src/dtmapping.mjs'
6
6
  import dtpick from 'wsemi/src/dtpick.mjs'
7
7
  import nowms2str from 'wsemi/src/nowms2str.mjs'
8
8
  import now2strp from 'wsemi/src/now2strp.mjs'
9
9
  import isestr from 'wsemi/src/isestr'
10
+ import filePathToCode from '../../../server/filePathToCode.mjs'
10
11
 
11
12
 
12
13
  let keyTable = 'apis'
@@ -43,6 +44,10 @@ let settings = {
43
44
  name: '版本',
44
45
  type: 'STRING',
45
46
  },
47
+ 'group': { //用來統一管理外部API來源
48
+ name: '群組',
49
+ type: 'STRING',
50
+ },
46
51
  'levels': { //階層群組用英文句點「.」分隔
47
52
  name: '階層群組',
48
53
  type: 'STRING',
@@ -115,6 +120,7 @@ let funTest = () => {
115
120
  'url': 'http://localhost:11005/getAPIsList',
116
121
  'method': 'get',
117
122
  'version': 'v1',
123
+ 'group': '全部',
118
124
  'levels': 'API',
119
125
  'keywords': 'API;center',
120
126
  'state': 'ok',
@@ -129,7 +135,7 @@ let funTest = () => {
129
135
  | paramB | DOUBLE | 123.456 |
130
136
  `,
131
137
  'inputExample': `http://localhost:11005/getAPIsList?token={token}&id={id}&paramA=123&paramB=123.456`,
132
- 'mdOutputParams': `### 回傳數據結構: Array of objects
138
+ 'mdOutputParams': `### 回傳數據欄位: Array of objects
133
139
  | 參數 | 型別 | 範例 |
134
140
  | -- | -- | -- |
135
141
  | id | STRING | id-for-test |
@@ -137,6 +143,7 @@ let funTest = () => {
137
143
  | color | STRING | #f26 |
138
144
  | paramA | INTEGER | 321 |
139
145
  | paramB | DOUBLE | 654.321 |
146
+ | paramC | STRING | ${filePathToCode('C:\\\\pj\\abc\\filename.pdf')} |
140
147
  `,
141
148
  'outputExample': `
142
149
  [
@@ -145,21 +152,24 @@ let funTest = () => {
145
152
  "weight": 12.3,
146
153
  "color": "#f26",
147
154
  "paramA": 101,
148
- "paramB": 0.01
155
+ "paramB": 0.01,
156
+ "paramC": "C:\\\\\\\\pj\\\\abc\\\\filename1.pdf"
149
157
  },
150
158
  {
151
159
  "id": "id-for-test-2",
152
160
  "weight": 22.3,
153
161
  "color": "#2f6",
154
162
  "paramA": 102,
155
- "paramB": 1.01
163
+ "paramB": 1.01,
164
+ "paramC": "C:\\\\\\\\pj\\\\abc\\\\filename2.pdf"
156
165
  },
157
166
  {
158
167
  "id": "id-for-test-3",
159
168
  "weight": 32.3,
160
169
  "color": "#26f",
161
170
  "paramA": 103,
162
- "paramB": 2.01
171
+ "paramB": 2.01,
172
+ "paramC": "C:\\\\\\\\pj\\\\abc\\\\filename3.pdf"
163
173
  }
164
174
  ]
165
175
  `,
@@ -171,6 +181,7 @@ let funTest = () => {
171
181
  'url': 'http://localhost:11005/getPetsList',
172
182
  'method': 'get',
173
183
  'version': 'v1',
184
+ 'group': '寵物',
174
185
  'levels': '寵物',
175
186
  'keywords': 'pets',
176
187
  'state': 'ok',
@@ -185,7 +196,7 @@ let funTest = () => {
185
196
  | paramB | DOUBLE | 123.456 |
186
197
  `,
187
198
  'inputExample': `http://localhost:11005/getAPIsList?token={token}&id={id}&paramA=123&paramB=123.456`,
188
- 'mdOutputParams': `### 回傳數據結構: Array of objects
199
+ 'mdOutputParams': `### 回傳數據欄位: Array of objects
189
200
  | 參數 | 型別 | 範例 |
190
201
  | -- | -- | -- |
191
202
  | id | STRING | id-for-test |
@@ -193,6 +204,7 @@ let funTest = () => {
193
204
  | color | STRING | #f26 |
194
205
  | paramA | INTEGER | 321 |
195
206
  | paramB | DOUBLE | 654.321 |
207
+ | paramC | STRING | ${filePathToCode('C:\\\\pj\\abc\\filename.pdf')} |
196
208
  `,
197
209
  'outputExample': `
198
210
  [
@@ -201,21 +213,24 @@ let funTest = () => {
201
213
  "weight": 12.3,
202
214
  "color": "#f26",
203
215
  "paramA": 101,
204
- "paramB": 0.01
216
+ "paramB": 0.01,
217
+ "paramC": "C:\\\\\\\\pj\\\\abc\\\\filename1.pdf"
205
218
  },
206
219
  {
207
220
  "id": "id-for-test-2",
208
221
  "weight": 22.3,
209
222
  "color": "#2f6",
210
223
  "paramA": 102,
211
- "paramB": 1.01
224
+ "paramB": 1.01,
225
+ "paramC": "C:\\\\\\\\pj\\\\abc\\\\filename2.pdf"
212
226
  },
213
227
  {
214
228
  "id": "id-for-test-3",
215
229
  "weight": 32.3,
216
230
  "color": "#26f",
217
231
  "paramA": 103,
218
- "paramB": 2.01
232
+ "paramB": 2.01,
233
+ "paramC": "C:\\\\\\\\pj\\\\abc\\\\filename3.pdf"
219
234
  }
220
235
  ]
221
236
  `,
@@ -227,6 +242,7 @@ let funTest = () => {
227
242
  'url': 'http://localhost:11005/getDogsList',
228
243
  'method': 'get',
229
244
  'version': 'v1',
245
+ 'group': '寵物',
230
246
  'levels': '寵物.狗狗',
231
247
  'keywords': 'pets;dogs',
232
248
  'state': 'ok',
@@ -241,7 +257,7 @@ let funTest = () => {
241
257
  | paramB | DOUBLE | 123.456 |
242
258
  `,
243
259
  'inputExample': `http://localhost:11005/getAPIsList?token={token}&id={id}&paramA=123&paramB=123.456`,
244
- 'mdOutputParams': `### 回傳數據結構: Array of objects
260
+ 'mdOutputParams': `### 回傳數據欄位: Array of objects
245
261
  | 參數 | 型別 | 範例 |
246
262
  | -- | -- | -- |
247
263
  | id | STRING | id-for-test |
@@ -249,6 +265,7 @@ let funTest = () => {
249
265
  | color | STRING | #f26 |
250
266
  | paramA | INTEGER | 321 |
251
267
  | paramB | DOUBLE | 654.321 |
268
+ | paramC | STRING | ${filePathToCode('C:\\\\pj\\abc\\filename.pdf')} |
252
269
  `,
253
270
  'outputExample': `
254
271
  [
@@ -257,21 +274,24 @@ let funTest = () => {
257
274
  "weight": 12.3,
258
275
  "color": "#f26",
259
276
  "paramA": 101,
260
- "paramB": 0.01
277
+ "paramB": 0.01,
278
+ "paramC": "C:\\\\\\\\pj\\\\abc\\\\filename1.pdf"
261
279
  },
262
280
  {
263
281
  "id": "id-for-test-2",
264
282
  "weight": 22.3,
265
283
  "color": "#2f6",
266
284
  "paramA": 102,
267
- "paramB": 1.01
285
+ "paramB": 1.01,
286
+ "paramC": "C:\\\\\\\\pj\\\\abc\\\\filename2.pdf"
268
287
  },
269
288
  {
270
289
  "id": "id-for-test-3",
271
290
  "weight": 32.3,
272
291
  "color": "#26f",
273
292
  "paramA": 103,
274
- "paramB": 2.01
293
+ "paramB": 2.01,
294
+ "paramC": "C:\\\\\\\\pj\\\\abc\\\\filename3.pdf"
275
295
  }
276
296
  ]
277
297
  `,
@@ -283,6 +303,7 @@ let funTest = () => {
283
303
  'url': 'http://localhost:11005/addDog',
284
304
  'method': 'post',
285
305
  'version': 'v1',
306
+ 'group': '寵物',
286
307
  'levels': '寵物.狗狗',
287
308
  'keywords': 'pets;dogs',
288
309
  'state': 'ok',
@@ -297,7 +318,7 @@ let funTest = () => {
297
318
  | paramB | DOUBLE | 123.456 |
298
319
  `,
299
320
  'inputExample': `http://localhost:11005/getAPIsList?token={token}&id={id}&paramA=123&paramB=123.456`,
300
- 'mdOutputParams': `### 回傳數據結構: Array of objects
321
+ 'mdOutputParams': `### 回傳數據欄位: Array of objects
301
322
  | 參數 | 型別 | 範例 |
302
323
  | -- | -- | -- |
303
324
  | id | STRING | id-for-test |
@@ -305,6 +326,7 @@ let funTest = () => {
305
326
  | color | STRING | #f26 |
306
327
  | paramA | INTEGER | 321 |
307
328
  | paramB | DOUBLE | 654.321 |
329
+ | paramC | STRING | ${filePathToCode('C:\\\\pj\\abc\\filename.pdf')} |
308
330
  `,
309
331
  'outputExample': `
310
332
  [
@@ -313,21 +335,24 @@ let funTest = () => {
313
335
  "weight": 12.3,
314
336
  "color": "#f26",
315
337
  "paramA": 101,
316
- "paramB": 0.01
338
+ "paramB": 0.01,
339
+ "paramC": "C:\\\\\\\\pj\\\\abc\\\\filename1.pdf"
317
340
  },
318
341
  {
319
342
  "id": "id-for-test-2",
320
343
  "weight": 22.3,
321
344
  "color": "#2f6",
322
345
  "paramA": 102,
323
- "paramB": 1.01
346
+ "paramB": 1.01,
347
+ "paramC": "C:\\\\\\\\pj\\\\abc\\\\filename2.pdf"
324
348
  },
325
349
  {
326
350
  "id": "id-for-test-3",
327
351
  "weight": 32.3,
328
352
  "color": "#26f",
329
353
  "paramA": 103,
330
- "paramB": 2.01
354
+ "paramB": 2.01,
355
+ "paramC": "C:\\\\\\\\pj\\\\abc\\\\filename3.pdf"
331
356
  }
332
357
  ]
333
358
  `,
@@ -339,6 +364,7 @@ let funTest = () => {
339
364
  'url': 'http://localhost:11005/updateDog',
340
365
  'method': 'put',
341
366
  'version': 'v1',
367
+ 'group': '寵物',
342
368
  'levels': '寵物.狗狗',
343
369
  'keywords': 'pets;dogs',
344
370
  'state': 'ok',
@@ -353,7 +379,7 @@ let funTest = () => {
353
379
  | paramB | DOUBLE | 123.456 |
354
380
  `,
355
381
  'inputExample': `http://localhost:11005/getAPIsList?token={token}&id={id}&paramA=123&paramB=123.456`,
356
- 'mdOutputParams': `### 回傳數據結構: Array of objects
382
+ 'mdOutputParams': `### 回傳數據欄位: Array of objects
357
383
  | 參數 | 型別 | 範例 |
358
384
  | -- | -- | -- |
359
385
  | id | STRING | id-for-test |
@@ -361,6 +387,7 @@ let funTest = () => {
361
387
  | color | STRING | #f26 |
362
388
  | paramA | INTEGER | 321 |
363
389
  | paramB | DOUBLE | 654.321 |
390
+ | paramC | STRING | ${filePathToCode('C:\\\\pj\\abc\\filename.pdf')} |
364
391
  `,
365
392
  'outputExample': `
366
393
  [
@@ -369,21 +396,24 @@ let funTest = () => {
369
396
  "weight": 12.3,
370
397
  "color": "#f26",
371
398
  "paramA": 101,
372
- "paramB": 0.01
399
+ "paramB": 0.01,
400
+ "paramC": "C:\\\\\\\\pj\\\\abc\\\\filename1.pdf"
373
401
  },
374
402
  {
375
403
  "id": "id-for-test-2",
376
404
  "weight": 22.3,
377
405
  "color": "#2f6",
378
406
  "paramA": 102,
379
- "paramB": 1.01
407
+ "paramB": 1.01,
408
+ "paramC": "C:\\\\\\\\pj\\\\abc\\\\filename2.pdf"
380
409
  },
381
410
  {
382
411
  "id": "id-for-test-3",
383
412
  "weight": 32.3,
384
413
  "color": "#26f",
385
414
  "paramA": 103,
386
- "paramB": 2.01
415
+ "paramB": 2.01,
416
+ "paramC": "C:\\\\\\\\pj\\\\abc\\\\filename3.pdf"
387
417
  }
388
418
  ]
389
419
  `,
@@ -395,6 +425,7 @@ let funTest = () => {
395
425
  'url': 'http://localhost:11005/deleteDog',
396
426
  'method': 'del',
397
427
  'version': 'v1',
428
+ 'group': '寵物',
398
429
  'levels': '寵物.狗狗',
399
430
  'keywords': 'pets;dogs',
400
431
  'state': 'ok',
@@ -409,7 +440,7 @@ let funTest = () => {
409
440
  | paramB | DOUBLE | 123.456 |
410
441
  `,
411
442
  'inputExample': `http://localhost:11005/getAPIsList?token={token}&id={id}&paramA=123&paramB=123.456`,
412
- 'mdOutputParams': `### 回傳數據結構: Array of objects
443
+ 'mdOutputParams': `### 回傳數據欄位: Array of objects
413
444
  | 參數 | 型別 | 範例 |
414
445
  | -- | -- | -- |
415
446
  | id | STRING | id-for-test |
@@ -417,6 +448,7 @@ let funTest = () => {
417
448
  | color | STRING | #f26 |
418
449
  | paramA | INTEGER | 321 |
419
450
  | paramB | DOUBLE | 654.321 |
451
+ | paramC | STRING | ${filePathToCode('C:\\\\pj\\abc\\filename.pdf')} |
420
452
  `,
421
453
  'outputExample': `
422
454
  [
@@ -425,21 +457,24 @@ let funTest = () => {
425
457
  "weight": 12.3,
426
458
  "color": "#f26",
427
459
  "paramA": 101,
428
- "paramB": 0.01
460
+ "paramB": 0.01,
461
+ "paramC": "C:\\\\\\\\pj\\\\abc\\\\filename1.pdf"
429
462
  },
430
463
  {
431
464
  "id": "id-for-test-2",
432
465
  "weight": 22.3,
433
466
  "color": "#2f6",
434
467
  "paramA": 102,
435
- "paramB": 1.01
468
+ "paramB": 1.01,
469
+ "paramC": "C:\\\\\\\\pj\\\\abc\\\\filename2.pdf"
436
470
  },
437
471
  {
438
472
  "id": "id-for-test-3",
439
473
  "weight": 32.3,
440
474
  "color": "#26f",
441
475
  "paramA": 103,
442
- "paramB": 2.01
476
+ "paramB": 2.01,
477
+ "paramC": "C:\\\\\\\\pj\\\\abc\\\\filename3.pdf"
443
478
  }
444
479
  ]
445
480
  `,
@@ -451,6 +486,7 @@ let funTest = () => {
451
486
  'url': 'http://localhost:11005/getCatsList',
452
487
  'method': 'get',
453
488
  'version': 'v1',
489
+ 'group': '寵物',
454
490
  'levels': '寵物.貓咪',
455
491
  'keywords': 'pets;cats',
456
492
  'state': 'ok',
@@ -465,7 +501,7 @@ let funTest = () => {
465
501
  | paramB | DOUBLE | 123.456 |
466
502
  `,
467
503
  'inputExample': `http://localhost:11005/getAPIsList?token={token}&id={id}&paramA=123&paramB=123.456`,
468
- 'mdOutputParams': `### 回傳數據結構: Array of objects
504
+ 'mdOutputParams': `### 回傳數據欄位: Array of objects
469
505
  | 參數 | 型別 | 範例 |
470
506
  | -- | -- | -- |
471
507
  | id | STRING | id-for-test |
@@ -473,6 +509,7 @@ let funTest = () => {
473
509
  | color | STRING | #f26 |
474
510
  | paramA | INTEGER | 321 |
475
511
  | paramB | DOUBLE | 654.321 |
512
+ | paramC | STRING | ${filePathToCode('C:\\\\pj\\abc\\filename.pdf')} |
476
513
  `,
477
514
  'outputExample': `
478
515
  [
@@ -481,21 +518,24 @@ let funTest = () => {
481
518
  "weight": 12.3,
482
519
  "color": "#f26",
483
520
  "paramA": 101,
484
- "paramB": 0.01
521
+ "paramB": 0.01,
522
+ "paramC": "C:\\\\\\\\pj\\\\abc\\\\filename1.pdf"
485
523
  },
486
524
  {
487
525
  "id": "id-for-test-2",
488
526
  "weight": 22.3,
489
527
  "color": "#2f6",
490
528
  "paramA": 102,
491
- "paramB": 1.01
529
+ "paramB": 1.01,
530
+ "paramC": "C:\\\\\\\\pj\\\\abc\\\\filename2.pdf"
492
531
  },
493
532
  {
494
533
  "id": "id-for-test-3",
495
534
  "weight": 32.3,
496
535
  "color": "#26f",
497
536
  "paramA": 103,
498
- "paramB": 2.01
537
+ "paramB": 2.01,
538
+ "paramC": "C:\\\\\\\\pj\\\\abc\\\\filename3.pdf"
499
539
  }
500
540
  ]
501
541
  `,
@@ -507,6 +547,7 @@ let funTest = () => {
507
547
  'url': 'http://localhost:11005/addCat',
508
548
  'method': 'post',
509
549
  'version': 'v1',
550
+ 'group': '寵物',
510
551
  'levels': '寵物.貓咪',
511
552
  'keywords': 'pets;cats',
512
553
  'state': 'ok',
@@ -521,7 +562,7 @@ let funTest = () => {
521
562
  | paramB | DOUBLE | 123.456 |
522
563
  `,
523
564
  'inputExample': `http://localhost:11005/getAPIsList?token={token}&id={id}&paramA=123&paramB=123.456`,
524
- 'mdOutputParams': `### 回傳數據結構: Array of objects
565
+ 'mdOutputParams': `### 回傳數據欄位: Array of objects
525
566
  | 參數 | 型別 | 範例 |
526
567
  | -- | -- | -- |
527
568
  | id | STRING | id-for-test |
@@ -529,6 +570,7 @@ let funTest = () => {
529
570
  | color | STRING | #f26 |
530
571
  | paramA | INTEGER | 321 |
531
572
  | paramB | DOUBLE | 654.321 |
573
+ | paramC | STRING | ${filePathToCode('C:\\\\pj\\abc\\filename.pdf')} |
532
574
  `,
533
575
  'outputExample': `
534
576
  [
@@ -537,21 +579,24 @@ let funTest = () => {
537
579
  "weight": 12.3,
538
580
  "color": "#f26",
539
581
  "paramA": 101,
540
- "paramB": 0.01
582
+ "paramB": 0.01,
583
+ "paramC": "C:\\\\\\\\pj\\\\abc\\\\filename1.pdf"
541
584
  },
542
585
  {
543
586
  "id": "id-for-test-2",
544
587
  "weight": 22.3,
545
588
  "color": "#2f6",
546
589
  "paramA": 102,
547
- "paramB": 1.01
590
+ "paramB": 1.01,
591
+ "paramC": "C:\\\\\\\\pj\\\\abc\\\\filename2.pdf"
548
592
  },
549
593
  {
550
594
  "id": "id-for-test-3",
551
595
  "weight": 32.3,
552
596
  "color": "#26f",
553
597
  "paramA": 103,
554
- "paramB": 2.01
598
+ "paramB": 2.01,
599
+ "paramC": "C:\\\\\\\\pj\\\\abc\\\\filename3.pdf"
555
600
  }
556
601
  ]
557
602
  `,
@@ -563,6 +608,7 @@ let funTest = () => {
563
608
  'url': 'http://localhost:11005/updateCat',
564
609
  'method': 'put',
565
610
  'version': 'v1',
611
+ 'group': '寵物',
566
612
  'levels': '寵物.貓咪',
567
613
  'keywords': 'pets;cats',
568
614
  'state': 'ok',
@@ -577,7 +623,7 @@ let funTest = () => {
577
623
  | paramB | DOUBLE | 123.456 |
578
624
  `,
579
625
  'inputExample': `http://localhost:11005/getAPIsList?token={token}&id={id}&paramA=123&paramB=123.456`,
580
- 'mdOutputParams': `### 回傳數據結構: Array of objects
626
+ 'mdOutputParams': `### 回傳數據欄位: Array of objects
581
627
  | 參數 | 型別 | 範例 |
582
628
  | -- | -- | -- |
583
629
  | id | STRING | id-for-test |
@@ -585,6 +631,7 @@ let funTest = () => {
585
631
  | color | STRING | #f26 |
586
632
  | paramA | INTEGER | 321 |
587
633
  | paramB | DOUBLE | 654.321 |
634
+ | paramC | STRING | ${filePathToCode('C:\\\\pj\\abc\\filename.pdf')} |
588
635
  `,
589
636
  'outputExample': `
590
637
  [
@@ -593,21 +640,24 @@ let funTest = () => {
593
640
  "weight": 12.3,
594
641
  "color": "#f26",
595
642
  "paramA": 101,
596
- "paramB": 0.01
643
+ "paramB": 0.01,
644
+ "paramC": "C:\\\\\\\\pj\\\\abc\\\\filename1.pdf"
597
645
  },
598
646
  {
599
647
  "id": "id-for-test-2",
600
648
  "weight": 22.3,
601
649
  "color": "#2f6",
602
650
  "paramA": 102,
603
- "paramB": 1.01
651
+ "paramB": 1.01,
652
+ "paramC": "C:\\\\\\\\pj\\\\abc\\\\filename2.pdf"
604
653
  },
605
654
  {
606
655
  "id": "id-for-test-3",
607
656
  "weight": 32.3,
608
657
  "color": "#26f",
609
658
  "paramA": 103,
610
- "paramB": 2.01
659
+ "paramB": 2.01,
660
+ "paramC": "C:\\\\\\\\pj\\\\abc\\\\filename3.pdf"
611
661
  }
612
662
  ]
613
663
  `,
@@ -619,6 +669,7 @@ let funTest = () => {
619
669
  'url': 'http://localhost:11005/deleteCat',
620
670
  'method': 'del',
621
671
  'version': 'v1',
672
+ 'group': '寵物',
622
673
  'levels': '寵物.貓咪',
623
674
  'keywords': 'pets;cats',
624
675
  'state': 'ok',
@@ -633,7 +684,7 @@ let funTest = () => {
633
684
  | paramB | DOUBLE | 123.456 |
634
685
  `,
635
686
  'inputExample': `http://localhost:11005/getAPIsList?token={token}&id={id}&paramA=123&paramB=123.456`,
636
- 'mdOutputParams': `### 回傳數據結構: Array of objects
687
+ 'mdOutputParams': `### 回傳數據欄位: Array of objects
637
688
  | 參數 | 型別 | 範例 |
638
689
  | -- | -- | -- |
639
690
  | id | STRING | id-for-test |
@@ -641,6 +692,7 @@ let funTest = () => {
641
692
  | color | STRING | #f26 |
642
693
  | paramA | INTEGER | 321 |
643
694
  | paramB | DOUBLE | 654.321 |
695
+ | paramC | STRING | ${filePathToCode('C:\\\\pj\\abc\\filename.pdf')} |
644
696
  `,
645
697
  'outputExample': `
646
698
  [
@@ -649,21 +701,24 @@ let funTest = () => {
649
701
  "weight": 12.3,
650
702
  "color": "#f26",
651
703
  "paramA": 101,
652
- "paramB": 0.01
704
+ "paramB": 0.01,
705
+ "paramC": "C:\\\\\\\\pj\\\\abc\\\\filename1.pdf"
653
706
  },
654
707
  {
655
708
  "id": "id-for-test-2",
656
709
  "weight": 22.3,
657
710
  "color": "#2f6",
658
711
  "paramA": 102,
659
- "paramB": 1.01
712
+ "paramB": 1.01,
713
+ "paramC": "C:\\\\\\\\pj\\\\abc\\\\filename2.pdf"
660
714
  },
661
715
  {
662
716
  "id": "id-for-test-3",
663
717
  "weight": 32.3,
664
718
  "color": "#26f",
665
719
  "paramA": 103,
666
- "paramB": 2.01
720
+ "paramB": 2.01,
721
+ "paramC": "C:\\\\\\\\pj\\\\abc\\\\filename3.pdf"
667
722
  }
668
723
  ]
669
724
  `,
@@ -675,6 +730,7 @@ let funTest = () => {
675
730
  'url': 'http://localhost:11005/getcarsList',
676
731
  'method': 'get',
677
732
  'version': 'v1',
733
+ 'group': '寵物',
678
734
  'levels': '交通工具.汽車',
679
735
  'keywords': 'vehicles;cars',
680
736
  'state': 'ok',
@@ -689,7 +745,7 @@ let funTest = () => {
689
745
  | paramB | DOUBLE | 123.456 |
690
746
  `,
691
747
  'inputExample': `http://localhost:11005/getAPIsList?token={token}&id={id}&paramA=123&paramB=123.456`,
692
- 'mdOutputParams': `### 回傳數據結構: Array of objects
748
+ 'mdOutputParams': `### 回傳數據欄位: Array of objects
693
749
  | 參數 | 型別 | 範例 |
694
750
  | -- | -- | -- |
695
751
  | id | STRING | id-for-test |
@@ -697,6 +753,7 @@ let funTest = () => {
697
753
  | color | STRING | #f26 |
698
754
  | paramA | INTEGER | 321 |
699
755
  | paramB | DOUBLE | 654.321 |
756
+ | paramC | STRING | ${filePathToCode('C:\\\\pj\\abc\\filename.pdf')} |
700
757
  `,
701
758
  'outputExample': `
702
759
  [
@@ -705,21 +762,24 @@ let funTest = () => {
705
762
  "weight": 12.3,
706
763
  "color": "#f26",
707
764
  "paramA": 101,
708
- "paramB": 0.01
765
+ "paramB": 0.01,
766
+ "paramC": "C:\\\\\\\\pj\\\\abc\\\\filename1.pdf"
709
767
  },
710
768
  {
711
769
  "id": "id-for-test-2",
712
770
  "weight": 22.3,
713
771
  "color": "#2f6",
714
772
  "paramA": 102,
715
- "paramB": 1.01
773
+ "paramB": 1.01,
774
+ "paramC": "C:\\\\\\\\pj\\\\abc\\\\filename2.pdf"
716
775
  },
717
776
  {
718
777
  "id": "id-for-test-3",
719
778
  "weight": 32.3,
720
779
  "color": "#26f",
721
780
  "paramA": 103,
722
- "paramB": 2.01
781
+ "paramB": 2.01,
782
+ "paramC": "C:\\\\\\\\pj\\\\abc\\\\filename3.pdf"
723
783
  }
724
784
  ]
725
785
  `,
@@ -731,6 +791,7 @@ let funTest = () => {
731
791
  'url': 'http://localhost:11005/addDog',
732
792
  'method': 'post',
733
793
  'version': 'v1',
794
+ 'group': '寵物',
734
795
  'levels': '交通工具.汽車',
735
796
  'keywords': 'vehicles;cars',
736
797
  'state': 'ok',
@@ -745,7 +806,7 @@ let funTest = () => {
745
806
  | paramB | DOUBLE | 123.456 |
746
807
  `,
747
808
  'inputExample': `http://localhost:11005/getAPIsList?token={token}&id={id}&paramA=123&paramB=123.456`,
748
- 'mdOutputParams': `### 回傳數據結構: Array of objects
809
+ 'mdOutputParams': `### 回傳數據欄位: Array of objects
749
810
  | 參數 | 型別 | 範例 |
750
811
  | -- | -- | -- |
751
812
  | id | STRING | id-for-test |
@@ -753,6 +814,7 @@ let funTest = () => {
753
814
  | color | STRING | #f26 |
754
815
  | paramA | INTEGER | 321 |
755
816
  | paramB | DOUBLE | 654.321 |
817
+ | paramC | STRING | ${filePathToCode('C:\\\\pj\\abc\\filename.pdf')} |
756
818
  `,
757
819
  'outputExample': `
758
820
  [
@@ -761,21 +823,24 @@ let funTest = () => {
761
823
  "weight": 12.3,
762
824
  "color": "#f26",
763
825
  "paramA": 101,
764
- "paramB": 0.01
826
+ "paramB": 0.01,
827
+ "paramC": "C:\\\\\\\\pj\\\\abc\\\\filename1.pdf"
765
828
  },
766
829
  {
767
830
  "id": "id-for-test-2",
768
831
  "weight": 22.3,
769
832
  "color": "#2f6",
770
833
  "paramA": 102,
771
- "paramB": 1.01
834
+ "paramB": 1.01,
835
+ "paramC": "C:\\\\\\\\pj\\\\abc\\\\filename2.pdf"
772
836
  },
773
837
  {
774
838
  "id": "id-for-test-3",
775
839
  "weight": 32.3,
776
840
  "color": "#26f",
777
841
  "paramA": 103,
778
- "paramB": 2.01
842
+ "paramB": 2.01,
843
+ "paramC": "C:\\\\\\\\pj\\\\abc\\\\filename3.pdf"
779
844
  }
780
845
  ]
781
846
  `,
@@ -787,6 +852,7 @@ let funTest = () => {
787
852
  'url': 'http://localhost:11005/updateDog',
788
853
  'method': 'put',
789
854
  'version': 'v1',
855
+ 'group': '寵物',
790
856
  'levels': '交通工具.汽車',
791
857
  'keywords': 'vehicles;cars',
792
858
  'state': 'ok',
@@ -801,7 +867,7 @@ let funTest = () => {
801
867
  | paramB | DOUBLE | 123.456 |
802
868
  `,
803
869
  'inputExample': `http://localhost:11005/getAPIsList?token={token}&id={id}&paramA=123&paramB=123.456`,
804
- 'mdOutputParams': `### 回傳數據結構: Array of objects
870
+ 'mdOutputParams': `### 回傳數據欄位: Array of objects
805
871
  | 參數 | 型別 | 範例 |
806
872
  | -- | -- | -- |
807
873
  | id | STRING | id-for-test |
@@ -809,6 +875,7 @@ let funTest = () => {
809
875
  | color | STRING | #f26 |
810
876
  | paramA | INTEGER | 321 |
811
877
  | paramB | DOUBLE | 654.321 |
878
+ | paramC | STRING | ${filePathToCode('C:\\\\pj\\abc\\filename.pdf')} |
812
879
  `,
813
880
  'outputExample': `
814
881
  [
@@ -817,21 +884,24 @@ let funTest = () => {
817
884
  "weight": 12.3,
818
885
  "color": "#f26",
819
886
  "paramA": 101,
820
- "paramB": 0.01
887
+ "paramB": 0.01,
888
+ "paramC": "C:\\\\\\\\pj\\\\abc\\\\filename1.pdf"
821
889
  },
822
890
  {
823
891
  "id": "id-for-test-2",
824
892
  "weight": 22.3,
825
893
  "color": "#2f6",
826
894
  "paramA": 102,
827
- "paramB": 1.01
895
+ "paramB": 1.01,
896
+ "paramC": "C:\\\\\\\\pj\\\\abc\\\\filename2.pdf"
828
897
  },
829
898
  {
830
899
  "id": "id-for-test-3",
831
900
  "weight": 32.3,
832
901
  "color": "#26f",
833
902
  "paramA": 103,
834
- "paramB": 2.01
903
+ "paramB": 2.01,
904
+ "paramC": "C:\\\\\\\\pj\\\\abc\\\\filename3.pdf"
835
905
  }
836
906
  ]
837
907
  `,
@@ -843,6 +913,7 @@ let funTest = () => {
843
913
  'url': 'http://localhost:11005/deleteDog',
844
914
  'method': 'del',
845
915
  'version': 'v1',
916
+ 'group': '寵物',
846
917
  'levels': '交通工具.汽車',
847
918
  'keywords': 'vehicles;cars',
848
919
  'state': 'ok',
@@ -857,7 +928,7 @@ let funTest = () => {
857
928
  | paramB | DOUBLE | 123.456 |
858
929
  `,
859
930
  'inputExample': `http://localhost:11005/getAPIsList?token={token}&id={id}&paramA=123&paramB=123.456`,
860
- 'mdOutputParams': `### 回傳數據結構: Array of objects
931
+ 'mdOutputParams': `### 回傳數據欄位: Array of objects
861
932
  | 參數 | 型別 | 範例 |
862
933
  | -- | -- | -- |
863
934
  | id | STRING | id-for-test |
@@ -865,6 +936,7 @@ let funTest = () => {
865
936
  | color | STRING | #f26 |
866
937
  | paramA | INTEGER | 321 |
867
938
  | paramB | DOUBLE | 654.321 |
939
+ | paramC | STRING | ${filePathToCode('C:\\\\pj\\abc\\filename.pdf')} |
868
940
  `,
869
941
  'outputExample': `
870
942
  [
@@ -873,21 +945,24 @@ let funTest = () => {
873
945
  "weight": 12.3,
874
946
  "color": "#f26",
875
947
  "paramA": 101,
876
- "paramB": 0.01
948
+ "paramB": 0.01,
949
+ "paramC": "C:\\\\\\\\pj\\\\abc\\\\filename1.pdf"
877
950
  },
878
951
  {
879
952
  "id": "id-for-test-2",
880
953
  "weight": 22.3,
881
954
  "color": "#2f6",
882
955
  "paramA": 102,
883
- "paramB": 1.01
956
+ "paramB": 1.01,
957
+ "paramC": "C:\\\\\\\\pj\\\\abc\\\\filename2.pdf"
884
958
  },
885
959
  {
886
960
  "id": "id-for-test-3",
887
961
  "weight": 32.3,
888
962
  "color": "#26f",
889
963
  "paramA": 103,
890
- "paramB": 2.01
964
+ "paramB": 2.01,
965
+ "paramC": "C:\\\\\\\\pj\\\\abc\\\\filename3.pdf"
891
966
  }
892
967
  ]
893
968
  `,