feat(backend,api): Rework whole comment
This commit is contained in:
@@ -14,6 +14,7 @@ security:
|
||||
- bearerAuth: []
|
||||
|
||||
paths:
|
||||
####### Application Forms #######
|
||||
/application-forms:
|
||||
get:
|
||||
summary: Get all ApplicationForms
|
||||
@@ -133,6 +134,7 @@ paths:
|
||||
"503":
|
||||
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/ServiceUnavailable"
|
||||
|
||||
####### Application Form Templates #######
|
||||
/application-form-templates:
|
||||
get:
|
||||
summary: Get all ApplicationFormTemplates
|
||||
@@ -246,6 +248,7 @@ paths:
|
||||
"503":
|
||||
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/ServiceUnavailable"
|
||||
|
||||
####### Users #######
|
||||
/users/{id}:
|
||||
parameters:
|
||||
- name: id
|
||||
@@ -291,54 +294,7 @@ paths:
|
||||
"503":
|
||||
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/ServiceUnavailable"
|
||||
|
||||
/comments:
|
||||
get:
|
||||
summary: Get all comments
|
||||
operationId: getAllComments
|
||||
tags:
|
||||
- comment
|
||||
responses:
|
||||
"200":
|
||||
description: Paged list of comments
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/PagedCommentDto"
|
||||
"400":
|
||||
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/BadRequest"
|
||||
"401":
|
||||
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/Unauthorized"
|
||||
"500":
|
||||
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/ServerError"
|
||||
"503":
|
||||
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/ServiceUnavailable"
|
||||
post:
|
||||
summary: Create a new comment
|
||||
operationId: createComment
|
||||
tags:
|
||||
- comment
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/CreateCommentDto"
|
||||
responses:
|
||||
"201":
|
||||
description: Successfully created comment
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/CommentDto"
|
||||
"400":
|
||||
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/BadRequest"
|
||||
"401":
|
||||
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/Unauthorized"
|
||||
"500":
|
||||
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/ServerError"
|
||||
"503":
|
||||
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/ServiceUnavailable"
|
||||
|
||||
####### Comments #######
|
||||
/comments/{id}:
|
||||
parameters:
|
||||
- name: id
|
||||
@@ -347,14 +303,20 @@ paths:
|
||||
schema:
|
||||
type: string
|
||||
format: uuid
|
||||
get:
|
||||
summary: Get a specific comment
|
||||
operationId: getCommentById
|
||||
put:
|
||||
summary: Update a comment
|
||||
operationId: updateComment
|
||||
tags:
|
||||
- comment
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/CommentDto"
|
||||
responses:
|
||||
"200":
|
||||
description: Get comment by ID
|
||||
description: Successfully updated comment
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
@@ -384,6 +346,77 @@ paths:
|
||||
"503":
|
||||
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/ServiceUnavailable"
|
||||
|
||||
/application-forms/{applicationFormId}/comments:
|
||||
parameters:
|
||||
- name: applicationFormId
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: uuid
|
||||
get:
|
||||
summary: Get comments for specific application form
|
||||
operationId: getCommentsByApplicationFormId
|
||||
tags:
|
||||
- comment
|
||||
responses:
|
||||
"200":
|
||||
description: Get comments for application form ID
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/PagedCommentDto"
|
||||
"400":
|
||||
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/BadRequest"
|
||||
"401":
|
||||
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/Unauthorized"
|
||||
"500":
|
||||
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/ServerError"
|
||||
"503":
|
||||
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/ServiceUnavailable"
|
||||
|
||||
/application-forms/{applicationFormId}/form-elements/{formElementId}/comments:
|
||||
parameters:
|
||||
- name: applicationFormId
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: uuid
|
||||
- name: formElementId
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: uuid
|
||||
post:
|
||||
summary: Create a new comment for a form element
|
||||
operationId: createComment
|
||||
tags:
|
||||
- comment
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/CreateCommentDto"
|
||||
responses:
|
||||
"201":
|
||||
description: Successfully created comment
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/CommentDto"
|
||||
"400":
|
||||
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/BadRequest"
|
||||
"401":
|
||||
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/Unauthorized"
|
||||
"500":
|
||||
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/ServerError"
|
||||
"503":
|
||||
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/ServiceUnavailable"
|
||||
|
||||
####### Roles #######
|
||||
/roles:
|
||||
get:
|
||||
summary: Get all roles
|
||||
@@ -479,6 +512,7 @@ paths:
|
||||
"503":
|
||||
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/ServiceUnavailable"
|
||||
|
||||
####### Files #######
|
||||
/files:
|
||||
get:
|
||||
summary: Get all files
|
||||
@@ -656,8 +690,6 @@ components:
|
||||
$ref: "#/components/schemas/FormOptionDto"
|
||||
type:
|
||||
$ref: "#/components/schemas/FormElementType"
|
||||
comments:
|
||||
$ref: "#/components/schemas/PagedCommentDto"
|
||||
|
||||
CreateFormElementDto:
|
||||
type: object
|
||||
@@ -716,6 +748,7 @@ components:
|
||||
required:
|
||||
- id
|
||||
- message
|
||||
- applicationFormId
|
||||
- formElementId
|
||||
- createdAt
|
||||
- modifiedAt
|
||||
@@ -726,6 +759,9 @@ components:
|
||||
format: uuid
|
||||
message:
|
||||
type: string
|
||||
applicationFormId:
|
||||
type: string
|
||||
format: uuid
|
||||
formElementId:
|
||||
type: string
|
||||
format: uuid
|
||||
@@ -742,9 +778,12 @@ components:
|
||||
type: object
|
||||
required:
|
||||
- message
|
||||
- createdBy
|
||||
properties:
|
||||
message:
|
||||
type: string
|
||||
createdBy:
|
||||
$ref: "#/components/schemas/UserDto"
|
||||
|
||||
PagedCommentDto:
|
||||
type: object
|
||||
|
||||
Reference in New Issue
Block a user