pg-mvc-service 2.0.109 → 2.0.111
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.
|
@@ -402,45 +402,16 @@ class ResponseType extends ReqResType_1.default {
|
|
|
402
402
|
// 単一エラーは1行説明
|
|
403
403
|
ymlString += `
|
|
404
404
|
'${status}':
|
|
405
|
-
description:
|
|
406
|
-
|
|
407
|
-
application/json:
|
|
408
|
-
schema:
|
|
409
|
-
type: object
|
|
410
|
-
properties:`;
|
|
405
|
+
description: ${list[0].code}: ${list[0].description}
|
|
406
|
+
`;
|
|
411
407
|
}
|
|
412
408
|
else {
|
|
413
409
|
// 複数エラーは箇条書き
|
|
414
410
|
const bullets = list.map(e => `- ${e.code !== '' ? `${e.code}: ` : ''}${e.description}`).join(descIndentJoin);
|
|
415
411
|
ymlString += `
|
|
416
412
|
'${status}':
|
|
417
|
-
description: |${descIndentJoin}
|
|
418
|
-
|
|
419
|
-
application/json:
|
|
420
|
-
schema:
|
|
421
|
-
type: object
|
|
422
|
-
properties:`;
|
|
423
|
-
}
|
|
424
|
-
if ([400, 404, 409, 422].includes(status)) {
|
|
425
|
-
ymlString += `
|
|
426
|
-
errorCode:
|
|
427
|
-
type: string
|
|
428
|
-
description: エラーコード
|
|
429
|
-
errorMessage:
|
|
430
|
-
type: string
|
|
431
|
-
description: エラーメッセージ`;
|
|
432
|
-
}
|
|
433
|
-
else if (status === 401) {
|
|
434
|
-
ymlString += `
|
|
435
|
-
message:
|
|
436
|
-
type: string
|
|
437
|
-
description: Authentication expired. Please login again.`;
|
|
438
|
-
}
|
|
439
|
-
else if (status === 500) {
|
|
440
|
-
ymlString += `
|
|
441
|
-
message:
|
|
442
|
-
type: string
|
|
443
|
-
description: Internal Server Error`;
|
|
413
|
+
description: |${descIndentJoin}${bullets}
|
|
414
|
+
`;
|
|
444
415
|
}
|
|
445
416
|
}
|
|
446
417
|
return ymlString;
|
package/package.json
CHANGED
|
@@ -447,44 +447,17 @@ export class ResponseType extends ReqResType {
|
|
|
447
447
|
// 単一エラーは1行説明
|
|
448
448
|
ymlString += `
|
|
449
449
|
'${status}':
|
|
450
|
-
description:
|
|
451
|
-
|
|
452
|
-
application/json:
|
|
453
|
-
schema:
|
|
454
|
-
type: object
|
|
455
|
-
properties:`;
|
|
450
|
+
description: ${list[0].code}: ${list[0].description}
|
|
451
|
+
`;
|
|
456
452
|
} else {
|
|
457
453
|
// 複数エラーは箇条書き
|
|
458
454
|
const bullets = list.map(e => `- ${e.code !== '' ? `${e.code}: ` : ''}${e.description}`).join(descIndentJoin);
|
|
459
455
|
ymlString += `
|
|
460
456
|
'${status}':
|
|
461
|
-
description: |${descIndentJoin}
|
|
462
|
-
|
|
463
|
-
application/json:
|
|
464
|
-
schema:
|
|
465
|
-
type: object
|
|
466
|
-
properties:`;
|
|
457
|
+
description: |${descIndentJoin}${bullets}
|
|
458
|
+
`;
|
|
467
459
|
}
|
|
468
460
|
|
|
469
|
-
if ([400, 404, 409, 422].includes(status)) {
|
|
470
|
-
ymlString += `
|
|
471
|
-
errorCode:
|
|
472
|
-
type: string
|
|
473
|
-
description: エラーコード
|
|
474
|
-
errorMessage:
|
|
475
|
-
type: string
|
|
476
|
-
description: エラーメッセージ`;
|
|
477
|
-
} else if (status === 401) {
|
|
478
|
-
ymlString += `
|
|
479
|
-
message:
|
|
480
|
-
type: string
|
|
481
|
-
description: Authentication expired. Please login again.`;
|
|
482
|
-
} else if (status === 500) {
|
|
483
|
-
ymlString += `
|
|
484
|
-
message:
|
|
485
|
-
type: string
|
|
486
|
-
description: Internal Server Error`;
|
|
487
|
-
}
|
|
488
461
|
}
|
|
489
462
|
|
|
490
463
|
return ymlString;
|