1
0
Fork 0

feat(api): add PUT /trainings/{trainingID}/dates/{dateID} to modify date

This commit is contained in:
Vojtěch Mareš 2024-04-27 21:10:10 +02:00
parent 87d432dd52
commit 04d261bb5d
Signed by: vojtech.mares
GPG key ID: C6827B976F17240D

View file

@ -293,6 +293,61 @@ paths:
application/json:
schema:
$ref: "#/components/schemas/Error"
put:
summary: Update a date of a training
operationId: updateTrainingDate
tags:
- training dates
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
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/NewTrainingDate"
responses:
"200":
description: Date updated
content:
application/json:
schema:
$ref: "#/components/schemas/TrainingDate"
"404":
description: Date not found
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
"400":
description: Invalid input
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
default:
description: Unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
/trainings/{trainingID}/dates/{dateID}/attendees:
get: