Skip to content

Commit 0f2c38c

Browse files
committed
Created openapi spec
1 parent fe6c057 commit 0f2c38c

File tree

1 file changed

+82
-30
lines changed

1 file changed

+82
-30
lines changed

schemas/openapi.yml renamed to openapi/openapi.yml

Lines changed: 82 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,16 @@ externalDocs:
1111
url: https://sessionize.com/playbook/api
1212
servers:
1313
- url: https://sessionize.com
14+
tags:
15+
- name: all
16+
- name: speakers
17+
- name: sessions
1418
paths:
1519
/api/v2/{endpointId}/view/All:
1620
get:
21+
tags:
22+
- "all"
23+
operationId: getAll
1724
parameters:
1825
- name: endpointId
1926
in: path
@@ -31,6 +38,9 @@ paths:
3138
deprecated: false
3239
/api/v2/{endpointId}/view/Speakers:
3340
get:
41+
tags:
42+
- "speakers"
43+
operationId: getAllSpeakers
3444
parameters:
3545
- name: endpointId
3646
in: path
@@ -50,6 +60,9 @@ paths:
5060
deprecated: false
5161
/api/v2/{endpointId}/view/Sessions:
5262
get:
63+
tags:
64+
- "sessions"
65+
operationId: getAllSessions
5366
parameters:
5467
- name: endpointId
5568
in: path
@@ -76,11 +89,11 @@ components:
7689
sessions:
7790
type: array
7891
items:
79-
$ref: '#/components/schemas/Session'
92+
$ref: '#/components/schemas/SessionAll'
8093
speakers:
8194
type: array
8295
items:
83-
$ref: '#/components/schemas/Speaker'
96+
$ref: '#/components/schemas/SpeakerAll'
8497
questions:
8598
type: array
8699
items:
@@ -214,13 +227,10 @@ components:
214227
- id
215228
- name
216229
- sort
217-
Session:
230+
BaseSession:
218231
type: object
219232
readOnly: true
220233
properties:
221-
id:
222-
type: string
223-
format: integer
224234
title:
225235
type: string
226236
description:
@@ -238,23 +248,10 @@ components:
238248
type: boolean
239249
isPlenumSession:
240250
type: boolean
241-
speakers:
242-
type: array
243-
items:
244-
anyOf:
245-
- type: string # All Endpoint
246-
format: uuid
247-
- $ref: '#/components/schemas/SpeakerMinimal' # Sessions Endpoint
248251
categoryItems:
249252
type: array
250253
items:
251254
type: integer
252-
questionAnswers:
253-
type: array
254-
items:
255-
anyOf:
256-
- $ref: '#/components/schemas/QuestionAnswer' # All Endpoint
257-
- $ref: '#/components/schemas/QuestionAnswerFull' # Sessions Endpoint
258255
roomId:
259256
type: integer
260257
nullable: true
@@ -272,15 +269,53 @@ components:
272269
required:
273270
- categoryItems
274271
- endsAt
275-
- id
276272
- isPlenumSession
277273
- isServiceSession
278-
- questionAnswers
279274
- roomId
280-
- speakers
281275
- startsAt
282276
- status
283277
- title
278+
Session:
279+
allOf:
280+
- $ref: '#/components/schemas/BaseSession'
281+
- type: object
282+
readOnly: true
283+
properties:
284+
id:
285+
type: string
286+
format: integer # Sessions Endpoint contains only numeric IDs
287+
speakers:
288+
type: array
289+
items:
290+
$ref: '#/components/schemas/SpeakerMinimal' # Sessions Endpoint
291+
questionAnswers:
292+
type: array
293+
items:
294+
$ref: '#/components/schemas/QuestionAnswerFull' # Sessions Endpoint
295+
required:
296+
- id
297+
- questionAnswers
298+
- speakers
299+
SessionAll:
300+
allOf:
301+
- $ref: '#/components/schemas/BaseSession'
302+
- type: object
303+
readOnly: true
304+
properties:
305+
id:
306+
type: string # All Endpoint contains numeric IDs mixed with UUIDs
307+
speakers:
308+
type: array
309+
items:
310+
type: string # All Endpoint
311+
questionAnswers:
312+
type: array
313+
items:
314+
$ref: '#/components/schemas/QuestionAnswer' # All Endpoint
315+
required:
316+
- id
317+
- questionAnswers
318+
- speakers
284319
SessionGroup:
285320
type: object
286321
readOnly: true
@@ -306,7 +341,7 @@ components:
306341
required:
307342
- id
308343
- name
309-
Speaker:
344+
BaseSpeaker:
310345
type: object
311346
readOnly: true
312347
properties:
@@ -333,12 +368,6 @@ components:
333368
type: array
334369
items:
335370
$ref: '#/components/schemas/Link'
336-
sessions:
337-
type: array
338-
items:
339-
anyOf:
340-
- type: integer # All Endpoint
341-
- $ref: '#/components/schemas/SessionMinimal' # Speakers Endpoint
342371
fullName:
343372
type: string
344373
# categoryItems - Always empty; ignored
@@ -350,8 +379,31 @@ components:
350379
- isTopSpeaker
351380
- lastName
352381
- links
353-
- sessions
354382
- tagLine
383+
Speaker:
384+
allOf:
385+
- $ref: '#/components/schemas/BaseSpeaker'
386+
- type: object
387+
readOnly: true
388+
properties:
389+
sessions:
390+
type: array
391+
items:
392+
$ref: '#/components/schemas/SessionMinimal' # Speakers Endpoint
393+
required:
394+
- sessions
395+
SpeakerAll:
396+
allOf:
397+
- $ref: '#/components/schemas/BaseSpeaker'
398+
- type: object
399+
readOnly: true
400+
properties:
401+
sessions:
402+
type: array
403+
items:
404+
type: integer # All Endpoint
405+
required:
406+
- sessions
355407
SpeakerMinimal:
356408
type: object
357409
readOnly: true

0 commit comments

Comments
 (0)