-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathspec.yaml
111 lines (108 loc) · 2.53 KB
/
spec.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
108
109
110
111
openapi: 3.0.0
info:
version: 1.7.0
title: EventGate
description: Validates and produces events
termsOfService: https://wikimediafoundation.org/wiki/Terms_of_Use
license:
name: Apache2 License
url: http://www.apache.org/licenses/LICENSE-2.0
paths:
# from routes/root.js
/robots.txt:
get:
tags:
- Root
- Robots
description: Gets robots.txt
responses:
200:
description: Success
default:
description: Error
content:
application/json:
schema:
$ref: '#/components/schemas/problem'
x-amples:
- title: robots.txt check
request: {}
response:
status: 200
/:
get:
tags:
- Root
description: The root service end-point
responses:
200:
description: Success
default:
description: Error
content:
application/json:
schema:
$ref: '#/components/schemas/problem'
x-amples:
- title: root with no query params
request: {}
response:
status: 404
- title: spec from root
request:
query:
spec: true
response:
status: 200
- title: doc from root
request:
query:
doc: true
response:
status: 200
- title: root with wrong query param
request:
query:
fooo: true
response:
status: 404
# from routes/events.js
/v1/events:
post:
summary: Produce events
responses:
201:
description: Success
202:
description: Hasty success. Response returned before events guaranteed to be persisted.
207:
description: Partial Success
content:
application/json:
schema:
$ref: '#/components/schemas/problem'
400:
description: Failure
content:
application/json:
schema:
$ref: '#/components/schemas/problem'
components:
schemas:
# A https://tools.ietf.org/html/draft-nottingham-http-problem
problem:
required:
- type
properties:
status:
type: integer
type:
type: string
title:
type: string
detail:
type: string
method:
type: string
uri:
type: string