|
@@ -21,32 +21,34 @@ import { preNotifyService } from '../service/pre-notify';
|
|
|
*
|
|
*
|
|
|
* components:
|
|
* components:
|
|
|
* schemas:
|
|
* schemas:
|
|
|
|
|
+ * CommentBody:
|
|
|
|
|
+ * description: The type for Comment.comment
|
|
|
|
|
+ * type: string
|
|
|
|
|
+ * example: good
|
|
|
|
|
+ * CommentPosition:
|
|
|
|
|
+ * description: comment position
|
|
|
|
|
+ * type: number
|
|
|
|
|
+ * example: 0
|
|
|
* Comment:
|
|
* Comment:
|
|
|
* description: Comment
|
|
* description: Comment
|
|
|
* type: object
|
|
* type: object
|
|
|
* properties:
|
|
* properties:
|
|
|
* _id:
|
|
* _id:
|
|
|
- * type: string
|
|
|
|
|
- * description: revision ID
|
|
|
|
|
- * example: 5e079a0a0afa6700170a75fb
|
|
|
|
|
|
|
+ * $ref: '#/components/schemas/ObjectId'
|
|
|
* __v:
|
|
* __v:
|
|
|
* type: number
|
|
* type: number
|
|
|
* description: DB record version
|
|
* description: DB record version
|
|
|
* example: 0
|
|
* example: 0
|
|
|
* page:
|
|
* page:
|
|
|
- * $ref: '#/components/schemas/Page/properties/_id'
|
|
|
|
|
|
|
+ * $ref: '#/components/schemas/ObjectId'
|
|
|
* creator:
|
|
* creator:
|
|
|
- * $ref: '#/components/schemas/User/properties/_id'
|
|
|
|
|
|
|
+ * $ref: '#/components/schemas/ObjectId'
|
|
|
* revision:
|
|
* revision:
|
|
|
- * $ref: '#/components/schemas/Revision/properties/_id'
|
|
|
|
|
|
|
+ * $ref: '#/components/schemas/ObjectId'
|
|
|
* comment:
|
|
* comment:
|
|
|
- * type: string
|
|
|
|
|
- * description: comment
|
|
|
|
|
- * example: good
|
|
|
|
|
|
|
+ * $ref: '#/components/schemas/CommentBody'
|
|
|
* commentPosition:
|
|
* commentPosition:
|
|
|
- * type: number
|
|
|
|
|
- * description: comment position
|
|
|
|
|
- * example: 0
|
|
|
|
|
|
|
+ * $ref: '#/components/schemas/CommentPosition'
|
|
|
* createdAt:
|
|
* createdAt:
|
|
|
* type: string
|
|
* type: string
|
|
|
* description: date created at
|
|
* description: date created at
|
|
@@ -88,11 +90,11 @@ module.exports = function(crowi, app) {
|
|
|
* - in: query
|
|
* - in: query
|
|
|
* name: page_id
|
|
* name: page_id
|
|
|
* schema:
|
|
* schema:
|
|
|
- * $ref: '#/components/schemas/Page/properties/_id'
|
|
|
|
|
|
|
+ * $ref: '#/components/schemas/ObjectId'
|
|
|
* - in: query
|
|
* - in: query
|
|
|
* name: revision_id
|
|
* name: revision_id
|
|
|
* schema:
|
|
* schema:
|
|
|
- * $ref: '#/components/schemas/Revision/properties/_id'
|
|
|
|
|
|
|
+ * $ref: '#/components/schemas/ObjectId'
|
|
|
* responses:
|
|
* responses:
|
|
|
* 200:
|
|
* 200:
|
|
|
* description: Succeeded to get comments of the page of the revision.
|
|
* description: Succeeded to get comments of the page of the revision.
|
|
@@ -101,7 +103,7 @@ module.exports = function(crowi, app) {
|
|
|
* schema:
|
|
* schema:
|
|
|
* properties:
|
|
* properties:
|
|
|
* ok:
|
|
* ok:
|
|
|
- * $ref: '#/components/schemas/V1Response/properties/ok'
|
|
|
|
|
|
|
+ * $ref: '#/components/schemas/V1ResponseOK'
|
|
|
* comments:
|
|
* comments:
|
|
|
* type: array
|
|
* type: array
|
|
|
* items:
|
|
* items:
|
|
@@ -190,13 +192,13 @@ module.exports = function(crowi, app) {
|
|
|
* type: object
|
|
* type: object
|
|
|
* properties:
|
|
* properties:
|
|
|
* page_id:
|
|
* page_id:
|
|
|
- * $ref: '#/components/schemas/Page/properties/_id'
|
|
|
|
|
|
|
+ * $ref: '#/components/schemas/ObjectId'
|
|
|
* revision_id:
|
|
* revision_id:
|
|
|
- * $ref: '#/components/schemas/Revision/properties/_id'
|
|
|
|
|
|
|
+ * $ref: '#/components/schemas/ObjectId'
|
|
|
* comment:
|
|
* comment:
|
|
|
- * $ref: '#/components/schemas/Comment/properties/comment'
|
|
|
|
|
|
|
+ * $ref: '#/components/schemas/CommentBody'
|
|
|
* comment_position:
|
|
* comment_position:
|
|
|
- * $ref: '#/components/schemas/Comment/properties/commentPosition'
|
|
|
|
|
|
|
+ * $ref: '#/components/schemas/CommentPosition'
|
|
|
* required:
|
|
* required:
|
|
|
* - commentForm
|
|
* - commentForm
|
|
|
* responses:
|
|
* responses:
|
|
@@ -207,7 +209,7 @@ module.exports = function(crowi, app) {
|
|
|
* schema:
|
|
* schema:
|
|
|
* properties:
|
|
* properties:
|
|
|
* ok:
|
|
* ok:
|
|
|
- * $ref: '#/components/schemas/V1Response/properties/ok'
|
|
|
|
|
|
|
+ * $ref: '#/components/schemas/V1ResponseOK'
|
|
|
* comment:
|
|
* comment:
|
|
|
* $ref: '#/components/schemas/Comment'
|
|
* $ref: '#/components/schemas/Comment'
|
|
|
* 403:
|
|
* 403:
|
|
@@ -336,13 +338,13 @@ module.exports = function(crowi, app) {
|
|
|
* type: object
|
|
* type: object
|
|
|
* properties:
|
|
* properties:
|
|
|
* page_id:
|
|
* page_id:
|
|
|
- * $ref: '#/components/schemas/Page/properties/_id'
|
|
|
|
|
|
|
+ * $ref: '#/components/schemas/ObjectId'
|
|
|
* revision_id:
|
|
* revision_id:
|
|
|
- * $ref: '#/components/schemas/Revision/properties/_id'
|
|
|
|
|
|
|
+ * $ref: '#/components/schemas/ObjectId'
|
|
|
* comment_id:
|
|
* comment_id:
|
|
|
- * $ref: '#/components/schemas/Comment/properties/_id'
|
|
|
|
|
|
|
+ * $ref: '#/components/schemas/ObjectId'
|
|
|
* comment:
|
|
* comment:
|
|
|
- * $ref: '#/components/schemas/Comment/properties/comment'
|
|
|
|
|
|
|
+ * $ref: '#/components/schemas/CommentBody'
|
|
|
* required:
|
|
* required:
|
|
|
* - form
|
|
* - form
|
|
|
* responses:
|
|
* responses:
|
|
@@ -353,7 +355,7 @@ module.exports = function(crowi, app) {
|
|
|
* schema:
|
|
* schema:
|
|
|
* properties:
|
|
* properties:
|
|
|
* ok:
|
|
* ok:
|
|
|
- * $ref: '#/components/schemas/V1Response/properties/ok'
|
|
|
|
|
|
|
+ * $ref: '#/components/schemas/V1ResponseOK'
|
|
|
* comment:
|
|
* comment:
|
|
|
* $ref: '#/components/schemas/Comment'
|
|
* $ref: '#/components/schemas/Comment'
|
|
|
* 403:
|
|
* 403:
|
|
@@ -433,7 +435,7 @@ module.exports = function(crowi, app) {
|
|
|
* schema:
|
|
* schema:
|
|
|
* properties:
|
|
* properties:
|
|
|
* comment_id:
|
|
* comment_id:
|
|
|
- * $ref: '#/components/schemas/Comment/properties/_id'
|
|
|
|
|
|
|
+ * $ref: '#/components/schemas/ObjectId'
|
|
|
* required:
|
|
* required:
|
|
|
* - comment_id
|
|
* - comment_id
|
|
|
* responses:
|
|
* responses:
|
|
@@ -444,7 +446,7 @@ module.exports = function(crowi, app) {
|
|
|
* schema:
|
|
* schema:
|
|
|
* properties:
|
|
* properties:
|
|
|
* ok:
|
|
* ok:
|
|
|
- * $ref: '#/components/schemas/V1Response/properties/ok'
|
|
|
|
|
|
|
+ * $ref: '#/components/schemas/V1ResponseOK'
|
|
|
* comment:
|
|
* comment:
|
|
|
* $ref: '#/components/schemas/Comment'
|
|
* $ref: '#/components/schemas/Comment'
|
|
|
* 403:
|
|
* 403:
|