Просмотр исходного кода

support(jsdoc): Add oneOf to response status 200. And add description to 503

Atsushi Nakatsugawa 1 год назад
Родитель
Сommit
6adadeb713
1 измененных файлов с 12 добавлено и 4 удалено
  1. 12 4
      apps/app/src/server/routes/apiv3/healthcheck.ts

+ 12 - 4
apps/app/src/server/routes/apiv3/healthcheck.ts

@@ -103,11 +103,19 @@ module.exports = (crowi) => {
    *          content:
    *            application/json:
    *              schema:
-   *                properties:
-   *                  info:
-   *                    $ref: '#/components/schemas/HealthcheckInfo'
+   *                oneOf:
+   *                  - type: object
+   *                    description: "Don't select checkServices"
+   *                    properties:
+   *                      status:
+   *                        type: string
+   *                  - type: object
+   *                    description: "Select checkServices"
+   *                    properties:
+   *                      info:
+   *                        $ref: '#/components/schemas/HealthcheckInfo'
    *        503:
-   *          description: Unhealthy
+   *          description: "errors occurs when using checkServicesStrictly"
    *          content:
    *            application/json:
    *              schema: