feat(api): add get training by slug endpoint
This commit is contained in:
parent
6c2da08375
commit
fe38dd6683
2 changed files with 161 additions and 39 deletions
|
|
@ -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"
|
||||
|
|
|
|||
Reference in a new issue