Yuki Takei 10 месяцев назад
Родитель
Сommit
a1b976ba0e

+ 4 - 3
apps/app/src/server/models/openapi/v1-response.js

@@ -3,14 +3,15 @@
  *
  *  components:
  *    schemas:
+ *      V1ResponseOK:
+ *        description: API is succeeded
+ *        type: boolean
  *      V1Response:
  *        description: Response v1
  *        type: object
  *        properties:
  *          ok:
- *            type: boolean
- *            description: API is succeeded
- *            example: true
+ *            $ref: '#/components/schemas/V1ResponseOK'
  *    responses:
  *      403:
  *        description: 'Forbidden'

+ 3 - 3
apps/app/src/server/routes/attachment/api.js

@@ -222,7 +222,7 @@ export const routesFactory = (crowi) => {
    *                schema:
    *                  properties:
    *                    ok:
-   *                      $ref: '#/components/schemas/V1Response/properties/ok'
+   *                      $ref: '#/components/schemas/V1ResponseOK'
    *                    attachment:
    *                      $ref: '#/components/schemas/AttachmentProfile'
    *          403:
@@ -300,7 +300,7 @@ export const routesFactory = (crowi) => {
    *                schema:
    *                  properties:
    *                    ok:
-   *                      $ref: '#/components/schemas/V1Response/properties/ok'
+   *                      $ref: '#/components/schemas/V1ResponseOK'
    *          403:
    *            $ref: '#/components/responses/403'
    *          500:
@@ -365,7 +365,7 @@ export const routesFactory = (crowi) => {
    *                schema:
    *                  properties:
    *                    ok:
-   *                      $ref: '#/components/schemas/V1Response/properties/ok'
+   *                      $ref: '#/components/schemas/V1ResponseOK'
    *          403:
    *            $ref: '#/components/responses/403'
    *          500:

+ 4 - 4
apps/app/src/server/routes/comment.js

@@ -99,7 +99,7 @@ module.exports = function(crowi, app) {
    *                schema:
    *                  properties:
    *                    ok:
-   *                      $ref: '#/components/schemas/V1Response/properties/ok'
+   *                      $ref: '#/components/schemas/V1ResponseOK'
    *                    comments:
    *                      type: array
    *                      items:
@@ -205,7 +205,7 @@ module.exports = function(crowi, app) {
    *                schema:
    *                  properties:
    *                    ok:
-   *                      $ref: '#/components/schemas/V1Response/properties/ok'
+   *                      $ref: '#/components/schemas/V1ResponseOK'
    *                    comment:
    *                      $ref: '#/components/schemas/Comment'
    *          403:
@@ -351,7 +351,7 @@ module.exports = function(crowi, app) {
    *                schema:
    *                  properties:
    *                    ok:
-   *                      $ref: '#/components/schemas/V1Response/properties/ok'
+   *                      $ref: '#/components/schemas/V1ResponseOK'
    *                    comment:
    *                      $ref: '#/components/schemas/Comment'
    *          403:
@@ -442,7 +442,7 @@ module.exports = function(crowi, app) {
    *                schema:
    *                  properties:
    *                    ok:
-   *                      $ref: '#/components/schemas/V1Response/properties/ok'
+   *                      $ref: '#/components/schemas/V1ResponseOK'
    *                    comment:
    *                      $ref: '#/components/schemas/Comment'
    *          403:

+ 2 - 2
apps/app/src/server/routes/page.js

@@ -158,7 +158,7 @@ module.exports = function(crowi, app) {
    *                schema:
    *                  properties:
    *                    ok:
-   *                      $ref: '#/components/schemas/V1Response/properties/ok'
+   *                      $ref: '#/components/schemas/V1ResponseOK'
    *                    tags:
    *                      $ref: '#/components/schemas/Tags'
    *          403:
@@ -206,7 +206,7 @@ module.exports = function(crowi, app) {
    *                schema:
    *                  properties:
    *                    ok:
-   *                      $ref: '#/components/schemas/V1Response/properties/ok'
+   *                      $ref: '#/components/schemas/V1ResponseOK'
    *                    updatePost:
    *                      $ref: '#/components/schemas/UpdatePost'
    *          403:

+ 1 - 1
apps/app/src/server/routes/search.ts

@@ -79,7 +79,7 @@ module.exports = function(crowi: Crowi, app) {
    *               schema:
    *                 properties:
    *                   ok:
-   *                     $ref: '#/components/schemas/V1Response/properties/ok'
+   *                     $ref: '#/components/schemas/V1ResponseOK'
    *                   meta:
    *                     $ref: '#/components/schemas/ElasticsearchResult/properties/meta'
    *                   totalCount:

+ 3 - 3
apps/app/src/server/routes/tag.js

@@ -68,7 +68,7 @@ module.exports = function(crowi, app) {
    *                schema:
    *                  properties:
    *                    ok:
-   *                      $ref: '#/components/schemas/V1Response/properties/ok'
+   *                      $ref: '#/components/schemas/V1ResponseOK'
    *                    tags:
    *                      $ref: '#/components/schemas/Tags'
    *          403:
@@ -122,7 +122,7 @@ module.exports = function(crowi, app) {
    *                schema:
    *                  properties:
    *                    ok:
-   *                      $ref: '#/components/schemas/V1Response/properties/ok'
+   *                      $ref: '#/components/schemas/V1ResponseOK'
    *                    tags:
    *                      $ref: '#/components/schemas/Tags'
    *          403:
@@ -199,7 +199,7 @@ module.exports = function(crowi, app) {
    *                schema:
    *                  properties:
    *                    ok:
-   *                      $ref: '#/components/schemas/V1Response/properties/ok'
+   *                      $ref: '#/components/schemas/V1ResponseOK'
    *                    data:
    *                      type: array
    *                      items: