-
Notifications
You must be signed in to change notification settings - Fork 0
/
api-spec.yml
91 lines (90 loc) · 2.09 KB
/
api-spec.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
openapi: 3.0.0
info:
description: Stuff Lightning Talk API
version: 1.0.0
title: Stuff Lightning Talk API
contact:
email: [email protected]
paths:
/talks:
post:
summary: Submit a new talk
operationId: createTalk
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/TalkSubmission"
responses:
"200":
description: "Accepted"
content:
application/json:
schema:
$ref: "#/components/schemas/Talk"
"400":
description: "Invalid values"
content:
application/json:
schema:
$ref: "#/components/schemas/ApiError"
get:
summary: Get all talks for next session.
operationId: findTalks
responses:
"200":
description: "Success"
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/Talk"
servers:
- url: http://localhost:8080/api/v1
components:
schemas:
TalkSubmission:
type: object
properties:
topic:
type: string
maxLength: 80
description:
type: string
description: 120 words maximum
email:
type: string
format: email
maxLength: 255
required:
- topic
- description
- email
Talk:
allOf:
- $ref: "#/components/schemas/TalkSubmission"
- type: object
properties:
id:
type: integer
format: int64
submittedAt:
type: string
format: date-time
sessionDate:
type: string
format: date
ipaddr:
type: string
hostname:
type: string
os:
type: string
browser:
type: string
ApiError:
type: object
properties:
msg:
type: string