forked from hpi-sam/digital-fuesim-manv
-
Notifications
You must be signed in to change notification settings - Fork 0
/
swagger.yml
112 lines (112 loc) · 3.89 KB
/
swagger.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
openapi: 3.0.3
info:
title: Digital Fuesim MANV HTTP API
description: HTTP API of the digital-fuesim-manv project
version: 1.2.7
paths:
/api/health:
get:
summary: Gets service health
operationId: getHealth
responses:
200:
description: Service operational
content:
application/json:
schema:
$ref: '#/components/schemas/HealthResponse'
503:
description: Service not operational
content:
application/json:
schema:
$ref: '#/components/schemas/HealthResponse'
/api/exercise:
post:
summary: Create a new exercise
operationId: createExercise
responses:
201:
description: Exercise successfully created
content:
application/json:
schema:
$ref: '#/components/schemas/ExerciseIdResponse'
503:
description: Exercise could not be created due to a lack of ids
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
/api/exercise/{exerciseId}:
parameters:
- $ref: '#/components/parameters/ExerciseId'
get:
summary: Check whether an exercise id exists
operationId: getExercise
responses:
200:
description: Exercise exists
404:
description: Exercise does not exist
delete:
summary: Delete an exercise
operationId: deleteExercise
responses:
204:
description: Exercise deleted
403:
description: Tried to delete exercise using participant id
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
404:
description: Exercise not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
/api/exercise/{exerciseId}/history:
parameters:
- $ref: '#/components/parameters/ExerciseId'
get:
summary: Get the history of the exercise
operationId: getExerciseHistory
responses:
200:
description: Exercise history in the payload (TODO:)
404:
description: Exercise does not exist
components:
schemas:
HealthResponse:
type: object
properties:
status:
type: string
description: Current status of the server
ExerciseIdResponse:
type: object
properties:
participantId:
type: string
description: Participant id of the exercise
trainerId:
type: string
description: Trainer id of the exercise
ErrorResponse:
type: object
properties:
message:
type: string
description: Error message
parameters:
ExerciseId:
name: exerciseId
in: path
description: The exercise id
required: true
schema:
type: string
example: '123456'