feat(api): add routes to get only upcoming training dates per training and general
This commit is contained in:
parent
606854d1d5
commit
97d6532f71
1 changed files with 50 additions and 0 deletions
|
|
@ -232,6 +232,46 @@ paths:
|
||||||
"500":
|
"500":
|
||||||
$ref: "#/components/responses/InternalError"
|
$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:
|
components:
|
||||||
parameters:
|
parameters:
|
||||||
TrainingID:
|
TrainingID:
|
||||||
|
|
@ -357,6 +397,16 @@ components:
|
||||||
UpdateTrainingDateResponse:
|
UpdateTrainingDateResponse:
|
||||||
$ref: "#/components/schemas/TrainingDate"
|
$ref: "#/components/schemas/TrainingDate"
|
||||||
|
|
||||||
|
ListAllUpcomingTrainingDatesResponse:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: "#/components/schemas/TrainingDate"
|
||||||
|
|
||||||
|
ListTrainingUpcomingDatesResponse:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: "#/components/schemas/TrainingDate"
|
||||||
|
|
||||||
NewTrainingDate:
|
NewTrainingDate:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
|
|
|
||||||
Reference in a new issue