generated from peter-evans/swagger-github-pages
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathswagger.yaml
107 lines (105 loc) · 2.84 KB
/
swagger.yaml
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
openapi: 3.0.0
info:
description: "This a definition of API for communication with MOZART hardware."
version: "1.0.0"
title: "MOZART Low-level API"
tags:
- name: "Configuration"
description: "Stuff for setting things up"
- name: "Control"
description: "Controlling and monitoring the thing"
paths:
/motions/{motionId}/execute:
post:
tags:
- "Control"
summary: "Triggers execution of predefined motion."
parameters:
- name: "motionId"
in: "path"
description: "ID of the motion."
required: true
schema:
type: "integer"
format: "int64"
responses:
'204':
description: "Motion successfully started"
/motions:
get:
tags:
- "Configuration"
summary: "Returns a list of available motion types"
responses:
200:
description: "List of motions"
content:
application/json:
schema:
type: "array"
items:
oneOf:
- $ref: '#/components/schemas/Motion'
- $ref: '#/components/schemas/TranslateMotion'
discriminator:
propertyName: motionType
/motion/status:
get:
summary: "Returns the current status"
description: "Indicates whether the system is executing a motion or waiting for a command."
tags:
- "Control"
responses:
'200':
description: "The current status of the motion system"
content:
application/json:
schema:
type: "object"
properties:
status:
type: "string"
description: "Current status of the system"
enum:
- executing
- idle
motionId:
type: "integer"
format: "int64"
description: "The ID of the motion currently being executed, if applicable."
nullable: true
components:
schemas:
Vector3:
type: "object"
properties:
x:
type: number
y:
type: number
z:
type: number
Quaternion:
type: "object"
properties:
x:
type: number
y:
type: number
z:
type: number
w:
type: number
Motion:
type: "object"
description: Defines basic metadata about known motion primitive.
properties:
id:
type: "integer"
format: "int64"
motionType:
type: "string"
TranslateMotion:
allOf: # Combines the Motion and the inline model
- $ref: '#/components/schemas/Motion'
- $ref: '#/components/schemas/Vector3'