Skip to content

Commit 0ff6e48

Browse files
committed
feat: cdn, drafts, and websocket
1 parent f54a42f commit 0ff6e48

File tree

1 file changed

+371
-0
lines changed

1 file changed

+371
-0
lines changed

ddocs-api.yaml

+371
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,11 @@ paths:
117117
in: query
118118
name: year
119119
description: The year to fetch the events from
120+
- schema:
121+
type: string
122+
in: query
123+
name: search
124+
description: Returns events based off of a string search
120125
'/event/{eventId}':
121126
parameters:
122127
- schema:
@@ -141,6 +146,314 @@ paths:
141146
description: Internal Server Error
142147
operationId: get-event-eventId
143148
description: Gets an event based off of the id supplied
149+
/assets:
150+
post:
151+
summary: Create asset
152+
operationId: post-assets
153+
responses:
154+
'200':
155+
description: OK
156+
content:
157+
application/json:
158+
schema:
159+
type: object
160+
properties:
161+
id:
162+
type: string
163+
format:
164+
type: string
165+
'400':
166+
description: Bad Request
167+
'401':
168+
description: Unauthorized
169+
'403':
170+
description: Forbidden
171+
description: Creates a site asset and thumbnail image
172+
security:
173+
- JWT: []
174+
requestBody:
175+
content:
176+
multipart/form-data:
177+
schema:
178+
type: object
179+
properties:
180+
content:
181+
type: string
182+
format: binary
183+
examples: {}
184+
description: The form content for the asset
185+
'/assets/{id}':
186+
parameters:
187+
- schema:
188+
type: string
189+
name: id
190+
in: path
191+
required: true
192+
description: The id of the asset to fetch
193+
get:
194+
summary: Get asset
195+
tags: []
196+
responses:
197+
'200':
198+
description: OK
199+
content:
200+
image/jpeg:
201+
schema:
202+
type: object
203+
properties: {}
204+
examples: {}
205+
image/png:
206+
schema:
207+
type: object
208+
properties: {}
209+
'400':
210+
description: Bad Request
211+
'404':
212+
description: Not Found
213+
operationId: get-assets-id
214+
description: Gets an asset
215+
'/assets/{id}.thumb':
216+
parameters:
217+
- schema:
218+
type: string
219+
name: id
220+
in: path
221+
required: true
222+
description: The id of the assets thumbnail to fetch
223+
get:
224+
summary: Get asset thumbnail
225+
tags: []
226+
responses:
227+
'200':
228+
description: OK
229+
content:
230+
image/jpeg:
231+
schema:
232+
type: object
233+
properties: {}
234+
image/png:
235+
schema:
236+
type: object
237+
properties: {}
238+
'400':
239+
description: Bad Request
240+
'404':
241+
description: Not Found
242+
operationId: get-assets-id-.thumb
243+
description: 'Gets an assets thumbnail, this is only applicable to user generated content. Avatars don''t have thumbnails.'
244+
/drafts:
245+
get:
246+
summary: Get all drafts
247+
tags: []
248+
responses:
249+
'200':
250+
description: OK
251+
content:
252+
application/json:
253+
schema:
254+
$ref: '#/components/schemas/Draft'
255+
'401':
256+
description: Unauthorized
257+
'403':
258+
description: Forbidden
259+
operationId: get-drafts
260+
description: Gets all the current drafts
261+
security:
262+
- JWT: []
263+
post:
264+
summary: Create draft
265+
operationId: post-drafts
266+
responses:
267+
'200':
268+
description: OK
269+
content:
270+
application/json:
271+
schema:
272+
$ref: '#/components/schemas/Draft'
273+
'400':
274+
description: Bad Request
275+
'401':
276+
description: Unauthorized
277+
'403':
278+
description: Forbidden
279+
requestBody:
280+
$ref: '#/components/requestBodies/CreateDraft'
281+
security:
282+
- JWT: []
283+
description: Creates a draft
284+
'/drafts/{id}':
285+
parameters:
286+
- schema:
287+
type: string
288+
name: id
289+
in: path
290+
required: true
291+
description: 'The id of the draft '
292+
get:
293+
summary: Get draft
294+
tags: []
295+
responses:
296+
'200':
297+
description: OK
298+
content:
299+
application/json:
300+
schema:
301+
$ref: '#/components/schemas/Draft'
302+
'400':
303+
description: Bad Request
304+
'401':
305+
description: Unauthorized
306+
'403':
307+
description: Forbidden
308+
'404':
309+
description: Not Found
310+
operationId: get-drafts-id
311+
security:
312+
- JWT: []
313+
description: Gets a draft
314+
patch:
315+
summary: Modify draft
316+
operationId: patch-drafts-id
317+
responses:
318+
'200':
319+
description: OK
320+
content:
321+
application/json:
322+
schema:
323+
$ref: '#/components/schemas/Draft'
324+
'400':
325+
description: Bad Request
326+
'401':
327+
description: Unauthorized
328+
'403':
329+
description: Forbidden
330+
'404':
331+
description: Not Found
332+
description: 'Modifies a draft, all json properties are optional.'
333+
security:
334+
- JWT: []
335+
requestBody:
336+
$ref: '#/components/requestBodies/CreateDraft'
337+
'/drafts/{id}/summaries':
338+
parameters:
339+
- schema:
340+
type: string
341+
name: id
342+
in: path
343+
required: true
344+
description: The id of the draft
345+
post:
346+
summary: Create summary
347+
operationId: post-drafts-id-summaries
348+
responses:
349+
'200':
350+
description: OK
351+
content:
352+
application/json:
353+
schema:
354+
$ref: '#/components/schemas/Draft'
355+
'400':
356+
description: Bad Request
357+
'401':
358+
description: Unauthorized
359+
'403':
360+
description: Forbidden
361+
'404':
362+
description: Not Found
363+
description: Creates a new summary for this draft
364+
requestBody:
365+
$ref: '#/components/requestBodies/CreateSummary'
366+
security:
367+
- JWT: []
368+
'/drafts/{id}/summaries/{summary.id}':
369+
parameters:
370+
- schema:
371+
type: string
372+
name: id
373+
in: path
374+
required: true
375+
description: The draft id
376+
- schema:
377+
type: string
378+
name: summary.id
379+
in: path
380+
required: true
381+
description: The summary id
382+
patch:
383+
summary: Modify summary
384+
operationId: patch-drafts-id-summaries-summary.id
385+
responses:
386+
'200':
387+
description: OK
388+
content:
389+
application/json:
390+
schema:
391+
$ref: '#/components/schemas/Draft'
392+
'400':
393+
description: Bad Request
394+
'401':
395+
description: Unauthorized
396+
'403':
397+
description: Forbidden
398+
'404':
399+
description: Not Found
400+
description: 'Modifies this summary, all json properties are optional'
401+
requestBody:
402+
$ref: '#/components/requestBodies/CreateSummary'
403+
delete:
404+
summary: Delete summary
405+
operationId: delete-drafts-id-summaries-summary.id
406+
responses:
407+
'200':
408+
description: OK
409+
content:
410+
application/json:
411+
schema:
412+
$ref: '#/components/schemas/Draft'
413+
'400':
414+
description: Bad Request
415+
'401':
416+
description: Unauthorized
417+
'403':
418+
description: Forbidden
419+
'404':
420+
description: Not Found
421+
description: Deletes this summary
422+
'/events/{id}/related':
423+
parameters:
424+
- schema:
425+
type: string
426+
name: id
427+
in: path
428+
required: true
429+
description: The id of the event to get related ones from
430+
get:
431+
summary: Get related events
432+
tags: []
433+
responses:
434+
'200':
435+
description: OK
436+
content:
437+
application/json:
438+
schema:
439+
type: array
440+
items:
441+
$ref: '#/components/schemas/Event'
442+
'400':
443+
description: Bad Request
444+
'404':
445+
description: Not Found
446+
operationId: get-events-id-related
447+
description: Gets a collection of related events to the specified event
448+
/socket:
449+
get:
450+
summary: Open websocket
451+
tags: []
452+
responses:
453+
'101':
454+
description: Switching Protocols
455+
operationId: get-socket
456+
description: Opens a websocket
144457
components:
145458
schemas:
146459
User:
@@ -304,7 +617,65 @@ components:
304617
- content
305618
- type
306619
- isNew
620+
Draft:
621+
title: Draft
622+
type: object
623+
properties:
624+
id:
625+
type: string
626+
title:
627+
type: string
628+
description:
629+
type: string
630+
heldAt:
631+
type: string
632+
author:
633+
$ref: '#/components/schemas/Author'
634+
contributors:
635+
type: array
636+
items:
637+
$ref: '#/components/schemas/Author'
638+
thumbnail:
639+
type: string
640+
summaries:
641+
type: array
642+
items:
643+
$ref: '#/components/schemas/Summary'
307644
securitySchemes:
308645
JWT:
309646
type: http
310647
scheme: bearer
648+
requestBodies:
649+
CreateDraft:
650+
content:
651+
application/json:
652+
schema:
653+
type: object
654+
properties:
655+
heldAt:
656+
type: string
657+
title:
658+
type: string
659+
description:
660+
type: string
661+
thumbnail:
662+
type: string
663+
description: The model for creating a draft
664+
CreateSummary:
665+
content:
666+
application/json:
667+
schema:
668+
type: object
669+
properties:
670+
title:
671+
type: string
672+
content:
673+
type: string
674+
type:
675+
type: string
676+
isNew:
677+
type: string
678+
featureType:
679+
type:
680+
- string
681+
- 'null'

0 commit comments

Comments
 (0)