-
Notifications
You must be signed in to change notification settings - Fork 0
/
swagger.yml
117 lines (115 loc) · 2.7 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
113
114
115
116
117
swagger: '2.0'
info:
title: Comodoro API
description: Command fleets of containers.
version: "0.1.0"
host: localhost:8000
schemes:
- http
basePath: /api
produces:
- application/json
paths:
/fleet/units:
post:
summary: Fleet units
description: Submit a new fleet unit.
tags:
- fleet
parameters:
- name: unit
in: body
description: Unit to add to fleet
required: true
schema:
$ref: '#/definitions/Unit'
responses:
201:
description: The created unit
schema:
$ref: '#/definitions/Unit'
400:
description: Bad request
schema:
$ref: '#/definitions/Error'
409:
description: Duplicate unit
schema:
$ref: '#/definitions/Error'
default:
description: Unexpected error
schema:
$ref: '#/definitions/Error'
get:
summary: Fleet units
description: |
Get a collection of all fleet units.
tags:
- fleet
responses:
200:
description: An array of fleet units
schema:
type: array
items:
$ref: '#/definitions/Unit'
default:
description: Unexpected error
schema:
$ref: '#/definitions/Error'
/fleet/units/{name}:
get:
description: Get a fleet unit by ID.
parameters:
- name: name
in: path
description: Name of unit to fetch
required: true
type: string
responses:
200:
description: Fleet unit
schema:
$ref: '#/definitions/Unit'
404:
description: Not found
schema:
$ref: '#/definitions/Error'
default:
description: Unexpected error
schema:
$ref: '#/definitions/Error'
delete:
description: Delete a fleet unit by name.
parameters:
- name: name
in: path
description: Name of unit to delete
required: true
type: string
responses:
204:
description: Successfully deleted
404:
description: Not found
schema:
$ref: '#/definitions/Error'
default:
description: Unexpected error
schema:
$ref: '#/definitions/Error'
definitions:
Unit:
type: object
properties:
name:
type: string
description: Fleet unit name.
body:
type: object
description: Fleet unit body.
additionalProperties:
type: string
Error:
type: string
description: Error message