Jelajahi Sumber

add swagger to error-apiv3

Yohei-Shiina 3 tahun lalu
induk
melakukan
9da0f78850
1 mengubah file dengan 21 tambahan dan 0 penghapusan
  1. 21 0
      packages/core/src/models/vo/error-apiv3.ts

+ 21 - 0
packages/core/src/models/vo/error-apiv3.ts

@@ -1,3 +1,24 @@
+/**
+ * @swagger
+ *
+ *  components:
+ *    schemas:
+ *      ErrorV3:
+ *        description: Error for APIv3
+ *        type: object
+ *        properties:
+ *          message:
+ *            type: string
+ *            example: 'error message'
+ *          code:
+ *            type: string
+ *            example: 'someapi-error-with-something'
+ *          stack:
+ *            type: object
+ *          args:
+ *            type: object
+ *            example: { name: 'Josh', age: 20 }
+ */
 
 export class ErrorV3 extends Error {