1
0
Fork 0

feat(api): add routes to get only upcoming training dates per training and general

This commit is contained in:
Vojtěch Mareš 2024-05-05 16:24:02 +02:00
parent 606854d1d5
commit 97d6532f71
Signed by: vojtech.mares
GPG key ID: C6827B976F17240D

View file

@ -232,6 +232,46 @@ paths:
"500":
$ref: "#/components/responses/InternalError"
/v1/trainings/{trainingID}/upcoming-dates:
get:
summary: List upcoming dates of a training
operationId: listTrainingUpcomingDates
tags:
- Trainings
parameters:
- $ref: "#/components/parameters/TrainingID"
responses:
"200":
description: List of training dates
content:
application/json:
schema:
$ref: "#/components/schemas/ListTrainingUpcomingDatesResponse"
"404":
$ref: "#/components/responses/NotFoundError"
"500":
$ref: "#/components/responses/InternalError"
/v1/trainings/upcoming-dates:
get:
summary: List all dates of a training
operationId: listAllUpcomingTrainingDates
tags:
- Trainings
responses:
"200":
description: List of training upcoming dates
content:
application/json:
schema:
$ref: "#/components/schemas/ListAllUpcomingTrainingDatesResponse"
"404":
$ref: "#/components/responses/NotFoundError"
"500":
$ref: "#/components/responses/InternalError"
components:
parameters:
TrainingID:
@ -357,6 +397,16 @@ components:
UpdateTrainingDateResponse:
$ref: "#/components/schemas/TrainingDate"
ListAllUpcomingTrainingDatesResponse:
type: array
items:
$ref: "#/components/schemas/TrainingDate"
ListTrainingUpcomingDatesResponse:
type: array
items:
$ref: "#/components/schemas/TrainingDate"
NewTrainingDate:
type: object
properties: