|
|
@@ -19,7 +19,6 @@ import { excludeReadOnlyUser } from '../../../middlewares/exclude-read-only-user
|
|
|
import { serializePageSecurely } from '../../../models/serializers/page-serializer';
|
|
|
import { serializeUserSecurely } from '../../../models/serializers/user-serializer';
|
|
|
import { isV5ConversionError } from '../../../models/vo/v5-conversion-error';
|
|
|
-import { createPageHandlersFactory } from '../page/create-page';
|
|
|
|
|
|
|
|
|
const logger = loggerFactory('growi:routes:apiv3:pages'); // eslint-disable-line no-unused-vars
|
|
|
@@ -205,63 +204,6 @@ module.exports = (crowi) => {
|
|
|
],
|
|
|
};
|
|
|
|
|
|
- /**
|
|
|
- * @swagger
|
|
|
- *
|
|
|
- * /pages:
|
|
|
- * post:
|
|
|
- * tags: [Pages]
|
|
|
- * operationId: createPage
|
|
|
- * description: Create page
|
|
|
- * requestBody:
|
|
|
- * content:
|
|
|
- * application/json:
|
|
|
- * schema:
|
|
|
- * properties:
|
|
|
- * body:
|
|
|
- * type: string
|
|
|
- * description: Text of page
|
|
|
- * path:
|
|
|
- * $ref: '#/components/schemas/Page/properties/path'
|
|
|
- * grant:
|
|
|
- * $ref: '#/components/schemas/Page/properties/grant'
|
|
|
- * grantUserGroupId:
|
|
|
- * type: string
|
|
|
- * description: UserGroup ID
|
|
|
- * example: 5ae5fccfc5577b0004dbd8ab
|
|
|
- * pageTags:
|
|
|
- * type: array
|
|
|
- * items:
|
|
|
- * $ref: '#/components/schemas/Tag'
|
|
|
- * shouldGeneratePath:
|
|
|
- * type: boolean
|
|
|
- * description: Determine whether a new path should be generated
|
|
|
- * required:
|
|
|
- * - body
|
|
|
- * - path
|
|
|
- * responses:
|
|
|
- * 201:
|
|
|
- * description: Succeeded to create page.
|
|
|
- * content:
|
|
|
- * application/json:
|
|
|
- * schema:
|
|
|
- * properties:
|
|
|
- * data:
|
|
|
- * type: object
|
|
|
- * properties:
|
|
|
- * page:
|
|
|
- * $ref: '#/components/schemas/Page'
|
|
|
- * tags:
|
|
|
- * type: array
|
|
|
- * items:
|
|
|
- * $ref: '#/components/schemas/Tags'
|
|
|
- * revision:
|
|
|
- * $ref: '#/components/schemas/Revision'
|
|
|
- * 409:
|
|
|
- * description: page path is already existed
|
|
|
- */
|
|
|
- router.post('/', createPageHandlersFactory(crowi));
|
|
|
-
|
|
|
/**
|
|
|
* @swagger
|
|
|
*
|