-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathin-session-spec.raml
201 lines (197 loc) · 4.3 KB
/
in-session-spec.raml
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
189
190
191
192
193
194
195
196
197
198
199
200
201
#%RAML 1.0
title: Blog API
baseUri: /
description: |
# Welcome to Maxine's Blog!
I hope you have fun!
...and learn
...stuff
-Maxine.
mediaType:
- application/json
version: 1.0.0
protocols:
- HTTP
- HTTPS
/articles:
get:
displayName: Articles
description: Read all my articles!
responses:
"200":
description: This is my article list!
body:
items:
type: Article
"500":
body:
type: Error
"404":
body:
type: Error
example:
strict: true
value:
code: 404
description: There are no articles to show
post:
responses:
"201":
body:
type: Article
"400":
body:
type: Error
"409":
body:
type: Error
"500":
body:
type: Error
body:
properties:
title:
example: Example
type: string
content:
example: Example
type: string
writerId:
example: 1
type: number
format: int
categoryId?:
example: 1
type: number
format: int
slug:
example: Example
type: string
/articles/{slug}:
get:
responses:
"200":
body:
type: Article
"500":
body:
type: Error
"404":
body:
type: Error
example:
strict: true
value:
code: 404
description: There are no articles to show
delete:
responses:
"500":
body:
type: Error
"204": {}
"404":
body:
type: Error
example:
strict: true
value:
code: 404
description: There are no articles with this slug
put:
body:
type: Article
responses:
"200":
body:
type: Article
"500":
body:
type: Error
"400":
body:
type: Error
uriParameters:
slug:
example: importance-of-regular-exercise
type: string
types:
Category:
properties:
id:
example: 1
type: number
format: int
name:
example: Mental Health
type: string
articles?:
items:
type: Article
Error:
properties:
code:
example: 500
type: number
format: int
description:
example: There was an internal error. Nothing on your side tho!
type: string
Writer:
properties:
id:
example: 1
type: number
format: int
name:
example: Esmeralda
type: string
bio:
example: 20+ years of experience in IT and very smart.
type: string
articles?:
items:
type: Article
Article:
description: This is what you read in the blog!
properties:
id:
example: 1
type: number
format: int
title:
example: The Importance of Regular Exercise
type: string
content:
example: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed ac est eu mauris faucibus consectetur. Nunc vehicula hendrerit nulla, non vulputate justo ultrices sit amet. Mauris varius lorem sit amet sem laoreet, id lacinia eros auctor. Donec tincidunt augue vel dolor pharetra tincidunt. Aliquam dapibus sed neque vitae sagittis. Sed sit amet nibh id nunc vehicula laoreet. Morbi fermentum auctor est, eu tempor tortor lobortis nec. Etiam tincidunt, lorem a viverra facilisis, nunc lorem aliquet magna, euismod ullamcorper ligula metus et augue.
type: string
writerId:
example: 1
type: number
format: int
categoryId?:
example: 1
type: number
format: int
comments?:
items:
type: Comment
slug:
example: importance-of-regular-exercise
type: string
Comment:
properties:
id:
example: 1
type: number
format: int
content:
example: Hey, this was a nice post!
type: string
author:
example: Alex Martinez
type: string
articleId:
example: 1
type: number
format: int