Przeglądaj źródła

fix swagger-jsdoc

Shun Miyazawa 7 miesięcy temu
rodzic
commit
a1dd5a24e6
1 zmienionych plików z 13 dodań i 5 usunięć
  1. 13 5
      apps/app/src/server/routes/apiv3/page/index.ts

+ 13 - 5
apps/app/src/server/routes/apiv3/page/index.ts

@@ -4,7 +4,7 @@ import { pipeline } from 'stream/promises';
 
 
 import type { IPage, IRevision } from '@growi/core';
 import type { IPage, IRevision } from '@growi/core';
 import {
 import {
-  AllSubscriptionStatusType, PageGrant, SubscriptionStatusType,
+  AllSubscriptionStatusType, PageGrant, SCOPE, SubscriptionStatusType,
   getIdForRef,
   getIdForRef,
 } from '@growi/core';
 } from '@growi/core';
 import { ErrorV3 } from '@growi/core/dist/models';
 import { ErrorV3 } from '@growi/core/dist/models';
@@ -16,7 +16,6 @@ import sanitize from 'sanitize-filename';
 
 
 import { SupportedAction, SupportedTargetModel } from '~/interfaces/activity';
 import { SupportedAction, SupportedTargetModel } from '~/interfaces/activity';
 import type { IPageGrantData } from '~/interfaces/page';
 import type { IPageGrantData } from '~/interfaces/page';
-import { SCOPE } from '@growi/core/dist/interfaces';
 import { accessTokenParser } from '~/server/middlewares/access-token-parser';
 import { accessTokenParser } from '~/server/middlewares/access-token-parser';
 import { generateAddActivityMiddleware } from '~/server/middlewares/add-activity';
 import { generateAddActivityMiddleware } from '~/server/middlewares/add-activity';
 import { apiV3FormValidator } from '~/server/middlewares/apiv3-form-validator';
 import { apiV3FormValidator } from '~/server/middlewares/apiv3-form-validator';
@@ -279,9 +278,18 @@ module.exports = (crowi) => {
    *                  grant:
    *                  grant:
    *                    $ref: '#/components/schemas/PageGrant'
    *                    $ref: '#/components/schemas/PageGrant'
    *                  grantUserGroupIds:
    *                  grantUserGroupIds:
-   *                    type: string
-   *                    description: UserGroup ID
-   *                    example: 5ae5fccfc5577b0004dbd8ab
+   *                    type: array
+   *                    items:
+   *                      type: object
+   *                      properties:
+   *                        type:
+   *                          type: string
+   *                          description: Group type
+   *                          example: 'UserGroup'
+   *                        item:
+   *                          type: string
+   *                          description: UserGroup ID
+   *                          example: '5ae5fccfc5577b0004dbd8ab'
    *                  pageTags:
    *                  pageTags:
    *                    type: array
    *                    type: array
    *                    items:
    *                    items: