WIP: EOL
This commit is contained in:
parent
7ed1e05284
commit
49e05cac10
23 changed files with 613 additions and 253 deletions
|
|
@ -493,139 +493,6 @@ paths:
|
|||
schema:
|
||||
$ref: "#/components/schemas/ProblemDetails"
|
||||
|
||||
/trainings/{trainingID}/dates/{dateID}/attendees/{attendeeID}/feedback:
|
||||
post:
|
||||
summary: Submit feedback for an attendee of a date of a training
|
||||
operationId: createTrainingDateAttendeeFeedback
|
||||
tags:
|
||||
- training attendee feedback
|
||||
parameters:
|
||||
- name: trainingID
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: uuid
|
||||
x-go-type: training.ID
|
||||
x-go-type-import:
|
||||
path: gitlab.mareshq.com/hq/backoffice/backoffice-api/pkg/training
|
||||
- name: dateID
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: uuid
|
||||
x-go-type: training.DateID
|
||||
x-go-type-import:
|
||||
path: gitlab.mareshq.com/hq/backoffice/backoffice-api/pkg/training
|
||||
- name: attendeeID
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: uuid
|
||||
x-go-type: training.AttendeeID
|
||||
x-go-type-import:
|
||||
path: gitlab.mareshq.com/hq/backoffice/backoffice-api/pkg/training
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/NewTrainingFeedback"
|
||||
responses:
|
||||
"201":
|
||||
description: Feedback created
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/TrainingFeedback"
|
||||
"409":
|
||||
description: Feedback already submitted
|
||||
content:
|
||||
application/problem+json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ProblemDetails"
|
||||
"500":
|
||||
description: Internal error
|
||||
content:
|
||||
application/problem+json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ProblemDetails"
|
||||
|
||||
/trainings/{trainingID}/dates/{dateID}/feedback:
|
||||
get:
|
||||
summary: List all feedback of a date of a training
|
||||
operationId: listTrainingDateFeedback
|
||||
tags:
|
||||
- training attendee feedback
|
||||
parameters:
|
||||
- name: trainingID
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: uuid
|
||||
x-go-type: training.ID
|
||||
x-go-type-import:
|
||||
path: gitlab.mareshq.com/hq/backoffice/backoffice-api/pkg/training
|
||||
- name: dateID
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: uuid
|
||||
x-go-type: training.DateID
|
||||
x-go-type-import:
|
||||
path: gitlab.mareshq.com/hq/backoffice/backoffice-api/pkg/training
|
||||
responses:
|
||||
"200":
|
||||
description: A list of feedback
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
$ref: "#/components/schemas/TrainingFeedback"
|
||||
"500":
|
||||
description: Internal error
|
||||
content:
|
||||
application/problem+json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ProblemDetails"
|
||||
|
||||
/trainings/{trainingID}/feedback:
|
||||
get:
|
||||
summary: List all feedback of a training
|
||||
operationId: listTrainingFeedback
|
||||
tags:
|
||||
- training attendee feedback
|
||||
parameters:
|
||||
- name: trainingID
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: uuid
|
||||
x-go-type: training.ID
|
||||
x-go-type-import:
|
||||
path: gitlab.mareshq.com/hq/backoffice/backoffice-api/pkg/training
|
||||
responses:
|
||||
"200":
|
||||
description: A list of feedback
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
$ref: "#/components/schemas/TrainingFeedback"
|
||||
"500":
|
||||
description: Internal error
|
||||
content:
|
||||
application/problem+json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ProblemDetails"
|
||||
|
||||
/trainings/upcoming-dates:
|
||||
get:
|
||||
summary: List all upcoming dates of all trainings
|
||||
|
|
@ -679,22 +546,14 @@ components:
|
|||
properties:
|
||||
name:
|
||||
type: string
|
||||
duration:
|
||||
days:
|
||||
type: integer
|
||||
format: int32
|
||||
price:
|
||||
type: object
|
||||
properties:
|
||||
open:
|
||||
$ref: "#/components/schemas/Price"
|
||||
corporate:
|
||||
$ref: "#/components/schemas/Price"
|
||||
length:
|
||||
type: integer
|
||||
format: int32
|
||||
$ref: "#/components/schemas/TrainingPrice"
|
||||
required:
|
||||
- name
|
||||
- duration
|
||||
- days
|
||||
- price
|
||||
Training:
|
||||
allOf:
|
||||
|
|
@ -710,6 +569,31 @@ components:
|
|||
required:
|
||||
- id
|
||||
|
||||
TrainingPrice:
|
||||
types: array
|
||||
items:
|
||||
type: object
|
||||
required:
|
||||
- type
|
||||
- price
|
||||
properties:
|
||||
type:
|
||||
type: string
|
||||
enum: [open, corporate]
|
||||
price:
|
||||
type: object
|
||||
required:
|
||||
- currency
|
||||
- amount
|
||||
properties:
|
||||
currency:
|
||||
type: string
|
||||
enum: [CZK, EUR, USD]
|
||||
amount:
|
||||
type: number
|
||||
format: float64
|
||||
minimum: 0
|
||||
|
||||
NewTrainingDate:
|
||||
type: object
|
||||
properties:
|
||||
|
|
@ -776,40 +660,6 @@ components:
|
|||
required:
|
||||
- id
|
||||
|
||||
NewTrainingFeedback:
|
||||
type: object
|
||||
properties:
|
||||
rating:
|
||||
type: integer
|
||||
format: int32
|
||||
minimum: 0
|
||||
maximum: 10
|
||||
comment:
|
||||
type: string
|
||||
anonymous:
|
||||
type: boolean
|
||||
default: false
|
||||
isSharingAllowed:
|
||||
type: boolean
|
||||
default: false
|
||||
required:
|
||||
- rating
|
||||
- comment
|
||||
|
||||
TrainingFeedback:
|
||||
allOf:
|
||||
- $ref: "#/components/schemas/NewTrainingFeedback"
|
||||
- type: object
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
format: uuid
|
||||
x-go-type: training.FeedbackID
|
||||
x-go-type-import:
|
||||
path: gitlab.mareshq.com/hq/backoffice/backoffice-api/pkg/training
|
||||
required:
|
||||
- id
|
||||
|
||||
Price:
|
||||
type: object
|
||||
properties:
|
||||
|
|
|
|||
Reference in a new issue