This repository has been archived by the owner on Nov 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 61
/
api.yml
281 lines (281 loc) · 6.34 KB
/
api.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
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
swagger: "2.0"
info:
version: "0.0.0"
title: Gist Fox API
description: Gist Fox API is a sample pastes service similar to http://gist.github.com.
license:
name: MIT
url: https://raw.githubusercontent.com/apiaryio/dredd-example/master/LICENSE
host: api.example.com
basePath: /
schemes:
- http
consumes:
- application/json
produces:
- application/json
paths:
/:
get:
description: Gist Fox API entry point. Provides initial API affordances in the form of the HTTP Link header and HAL links.
operationId: Get_Retrieve the Entry Point_
produces:
- application/json
parameters: []
responses:
200:
description: ''
schema:
$ref: '#/definitions/entry-point'
/gists/{id}:
get:
description: A single Gist object. The Gist resource is the central resource in the Gist Fox API. It represents one paste - a single text note.
operationId: Get_Retrieve a Single Gist_
produces:
- application/json
parameters:
- name: id
in: path
required: true
type: string
description: ID of the Gist
x-example: '42'
responses:
200:
description: ''
schema:
$ref: '#/definitions/gist'
delete:
description: A single Gist object. The Gist resource is the central resource in the Gist Fox API. It represents one paste - a single text note.
operationId: Delete_Delete a Gist_
produces:
- application/json
parameters:
- name: id
in: path
required: true
type: string
description: ID of the Gist
x-example: '42'
responses:
204:
description: ''
patch:
description: A single Gist object. The Gist resource is the central resource in the Gist Fox API. It represents one paste - a single text note.
operationId: Patch_Edit a Gist_
produces:
- application/json
parameters:
- name: id
in: path
required: true
type: string
description: ID of the Gist
x-example: '42'
- name: body
in: body
required: true
schema:
$ref: '#/definitions/edit-gist'
responses:
200:
description: ''
schema:
$ref: '#/definitions/gist'
/gists:
get:
description: Collection of Gists.
operationId: Get_List All Gists_
produces:
- application/json
parameters:
- name: since
in: query
required: false
type: number
format: double
description: Timestamp in unix time format. Only Gists updated at or after this time are returned.
responses:
200:
description: ''
schema:
$ref: '#/definitions/gists'
post:
description: Collection of Gists.
operationId: Post_Create a Gist_
produces:
- application/json
parameters:
- name: since
in: query
required: false
type: number
format: double
description: Timestamp in unix time format. Only Gists updated at or after this time are returned.
- name: body
in: body
required: true
schema:
$ref: '#/definitions/create-gist'
responses:
201:
description: ''
schema:
$ref: '#/definitions/gist'
/gists/{id}/star:
get:
description: Gist's starred status.
operationId: Get_Check If a Gist Is Starred_
produces:
- application/json
parameters:
- name: id
in: path
required: true
type: string
description: ID of the Gist
x-example: '42'
responses:
200:
description: ''
schema:
$ref: '#/definitions/star'
put:
description: Gist's starred status.
operationId: Put_Star a Gist_
produces:
- application/json
parameters:
- name: id
in: path
required: true
type: string
description: ID of the Gist
x-example: '42'
responses:
204:
description: ''
delete:
description: Gist's starred status.
operationId: Delete_Unstar a Gist_
produces:
- application/json
parameters:
- name: id
in: path
required: true
type: string
description: ID of the Gist
x-example: '42'
responses:
204:
description: ''
definitions:
link:
type: object
properties:
href:
type: string
templated:
type: boolean
required:
- href
entry-point:
type: object
properties:
_links:
type: object
properties:
self:
$ref: '#/definitions/link'
gists:
$ref: '#/definitions/link'
required:
- self
- gists
required:
- _links
gist:
type: object
properties:
created_at:
type: string
description:
type: string
content:
type: string
id:
type: string
_links:
type: object
properties:
self:
$ref: '#/definitions/link'
star:
$ref: '#/definitions/link'
required:
- self
required:
- created_at
- description
- content
- id
- _links
gists:
type: object
properties:
_links:
type: object
properties:
self:
$ref: '#/definitions/link'
required:
- self
_embedded:
type: object
properties:
gists:
type: array
items:
$ref: '#/definitions/gist'
total:
type: number
required:
- _links
- _embedded
- total
edit-gist:
type: object
properties:
content:
type: string
required:
- content
create-gist:
type: object
properties:
description:
type: string
content:
type: string
required:
- description
- content
star:
type: object
properties:
gist_id:
type: string
starred:
type: boolean
_links:
type: object
properties:
self:
$ref: '#/definitions/link'
required:
- self
required:
- gist_id
- starred
- _links