1
0
Fork 0

feat(api): add get training by slug endpoint

This commit is contained in:
Vojtěch Mareš 2024-06-27 09:06:43 +02:00
parent 6c2da08375
commit fe38dd6683
Signed by: vojtech.mares
GPG key ID: C6827B976F17240D
2 changed files with 161 additions and 39 deletions

View file

@ -57,6 +57,26 @@ paths:
"500":
$ref: "#/components/responses/InternalError"
/v1/trainings/by-slug/{trainingSlug}:
get:
summary: Get a training by slug
operationId: getTrainingBySlug
tags:
- Trainings
parameters:
- $ref: "#/components/parameters/TrainingSlug"
responses:
"200":
description: A training
content:
application/json:
schema:
$ref: "#/components/schemas/GetTrainingResponse"
"404":
$ref: "#/components/responses/NotFoundError"
"500":
$ref: "#/components/responses/InternalError"
/v1/trainings/{trainingID}:
get:
summary: Get a training by ID
@ -484,6 +504,7 @@ components:
schema:
$ref: "#/components/schemas/TrainingDateID"
description: Training Date ID
TrainingDateAttendeeID:
in: path
name: trainingDateAttendeeID
@ -492,6 +513,14 @@ components:
$ref: "#/components/schemas/TrainingDateAttendeeID"
description: Training Date Attendee ID
TrainingSlug:
in: path
name: trainingSlug
required: true
schema:
type: string
description: Training slug
schemas:
CreateTrainingRequest:
$ref: "#/components/schemas/NewTraining"