Feedback: обновлен метод add и добавлен метод view

This commit is contained in:
ruslan
2023-02-07 16:11:03 +02:00
parent 381d1a7d96
commit 39aa88b463
+76 -38
View File
@@ -893,54 +893,50 @@ paths:
type: boolean type: boolean
feedback: feedback:
type: object type: object
properties: $ref: '#/definitions/feedback'
id:
description: Feedback model ID.
type: string
example: 77a14e58-7de2-4f50-bd1c-d2904f2a7b79
user_id:
description: User model ID.
type: string
example: null
department_id:
description: Department model ID.
type: string
example: cd1a4391-9fa7-4ae3-80c1-f9b46ad1838d
score:
description: Feedback score.
type: number
example: 5
text:
description: Feedback text.
type: string
example: Example text.
is_anonymous:
description: Anonymous feedback.
type: boolean
example: false
user_name:
description: The user name to which the feedback was left.
type: string
example: ""
department_name:
description: The department name to which the feedback was left.
type: string
example: "Fast food department"
created_user_name:
description: The user name of the person who left the feedback.
type: string
example: "Colonel Sanders"
400: 400:
description: Bad Request. Returns a message with the error details. description: Bad Request. Returns a message with the error details.
401: 401:
description: Unathorized request. description: Unathorized request.
403: 403:
description: Forbidden. description: Unathorized request.
404: 404:
description: Not found. Returns a message with the error details. description: Not found. Returns a message with the error details.
500: 500:
description: Server Error. description: Server Error.
/feedback/view:
get:
tags:
- feedback
summary: Details about feedback.
operationId: actionView
consumes:
- application/json
produces:
- application/json
parameters:
- name: id
in: query
description: Feedback item ID.
type: string
required: true
responses:
200:
description: Feedback details.
schema:
$ref: '#/definitions/feedback'
400:
description: Bad Request.
401:
description: Unathorized request.
403:
description: Unathorized request.
404:
description: Feedback not found.
500:
description: Server Error.
definitions: definitions:
accountSecret: accountSecret:
@@ -1540,6 +1536,48 @@ definitions:
xml: xml:
name: item name: item
feedback:
type: object
properties:
id:
description: Feedback model ID.
type: string
format: uuid
user_id:
description: User model ID.
type: string
format: uuid
default: null
department_id:
description: Department model ID.
type: string
format: uuid
default: null
score:
description: Feedback score.
type: integer
example: 5
text:
description: Feedback text.
type: string
example: Example text.
is_anonymous:
description: Anonymous feedback.
type: boolean
example: false
default: false
user_name:
description: The user name to which the feedback was left.
type: string
default: ""
department_name:
description: The department name to which the feedback was left.
type: string
default: ""
created_user_name:
description: The name of the user who left the feedback if it was not anonymous.
type: string
# Added by API Auto Mocking Plugin # Added by API Auto Mocking Plugin
# host: api.hrbox.io # host: api.hrbox.io
# basePath: /api/v2 # basePath: /api/v2