-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
OAS3.yml
188 lines (182 loc) · 5.4 KB
/
OAS3.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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
openapi: 3.0.0
info:
title: Comment 2 GitHub Service Interface
version: 0.1.0
description:
Service Interface to check the status of the Comment2Github service
contact:
name: comment2gh on GitHub
url: https://github.com/penguineer/comment2gh
servers:
- url: http://localhost:8080/v0
tags:
- name: mgmt
description: Common management functions
- name: comment
description: Comment functions
paths:
/health:
get:
summary: Provides health information about the service
tags:
- mgmt
operationId: health
responses:
'200':
description: endpoint is healthy
content:
application/json:
schema:
$ref: '#/components/schemas/health'
'500':
description: endpoint is NOT healthy
content:
application/json:
schema:
$ref: '#/components/schemas/health'
/oas3:
get:
summary: get this endpoint's Open API 3 specification
tags:
- mgmt
responses:
'200':
description: returns the API spec
content:
text/plain:
schema:
type: string
'500':
$ref: '#/components/responses/InternalError'
/comment:
post:
summary: Post a comment for processing
tags:
- comment
requestBody:
content:
application/x-www-form-urlencoded:
schema:
description: Schema fields if not configured differently for the service instance
type: object
properties:
cmt_slug:
type: string
description: The posts slug
cmt_name:
type: string
description: The commenter's name
cmt_email:
type: string
description: The commenter's e-mail address
cmt_url:
type: string
description: A website URL provided by the commenter
cmt_message:
type: string
description: The actual comment message
responses:
'201':
description: PR has been created
content:
application/json:
schema:
type: object
properties:
cid:
description: Comment ID
type: integer
date:
description: Comment Date in ISO format
type: string
pr:
description: Pull Request ID in the GitHub repository
type: integer
'400':
$ref: '#/components/responses/InvalidInput'
'500':
$ref: '#/components/responses/InternalError'
components:
schemas:
health:
type: object
properties:
git-version:
type: string
api-version:
type: string
timestamp:
type: string
format: date-time
uptime:
type: string
example: ISO8601 conforming timespan
amqp:
type: object
properties:
host:
type: string
description: Configured AMQP host
connection:
type: string
enum: [established, not established]
description: Connection state
channel:
type: string
enum: [established, not established]
description: Channel state
terminating:
type: boolean
description: True if terminating, in this case the object is healthy without connection or channel
consumer tag:
type: string
description: The AMQP consumer tag that was chosen for this channel (optional)
healthy:
type: boolean
description: true when AMQP status is considered healthy
evdev:
type: object
properties:
name:
type: string
description: Name of the PingBoard evdev device
path:
type: string
description: EvDev device path
phys:
type: string
description: USB device path
healthy:
type: boolean
description: true when evdev status is considered healthy
serial:
type: object
properties:
name:
type: string
description: Name of the PingBoard serial device
path:
type: string
description: Serial device path
healthy:
type: boolean
description: true when serial status is considered healthy
responses:
AuthenticationRequired:
description: Authentication is required (401)
NotAllowed:
description: The call is not allowed with the provided authentication (403)
InvalidInput:
description: One or more parameters are missing or invalid (400)
content:
text/plain:
schema:
type: string
example: error message
InternalError:
description: Internal error during execution (500)
content:
text/plain:
schema:
type: string
example: error message