-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathswagger.yaml
116 lines (112 loc) · 2.96 KB
/
swagger.yaml
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
swagger: "2.0"
info:
version: 1.0.0
title: Jotihunt
description: De jotihunt is een initiatief van Scouting Gelderland. De Jotihunt site/app zijn origineel gemaakt door de Scouting Roothaangroep en worden beschikbaar gesteld aan alle deelnemende groepen.
termsOfService: https://jotihunt-roothaan.herokuapp.com/
contact:
name: Jasper Roel
email: jasperroel@gmail.com
url: https://www.jasperroel.nl
license:
name: MIT
url: https://github.com/roothaan/jotihunt-site/blob/master/LICENSE
host: www.jotihunters.nl
basePath: /api
schemes:
- https
consumes:
- application/json
produces:
- application/json
securityDefinitions:
apiAuthentication:
type: apiKey
in: header
name: authenticationToken
description: |
This is the token you received from the /api/auth endpoint.
Example format would be:
`authenticationToken: 7yTT7vpOcp4GHWgxR7pLSf08viO5JHFWRKm+eq6MfHiO5tQOin/BYQ==`
security:
- apiAuthentication: []
paths:
/auth:
post:
security : []
description: |
Login and receive a token for the rest of your authenicated interaction
operationId: loginViaApi
responses:
200:
description: |
Login token <br />
<code>{<br />
"token": "7yTT7vpOcp4GHWgxR7pLSf08viO5JHFWRKm+eq6MfHiO5tQOin/BYQ=="<br />
}</code>
schema:
type: array
parameters:
- name: AuthenticationUsername
in: header
description: Your username
required: true
type: string
format: string
- name: AuthenticationPassword
in: header
description: Your username
required: true
type: string
format: password
/events:
get:
description: |
Returns all events you can publicly see
operationId: getEvents
responses:
200:
description: Event array
default:
description: unexpected error
schema:
$ref: '#/definitions/Error'
post:
description: Sets your event for this session
operationId: setEvent
responses:
200:
description: The event ID
default:
description: unexpected error
schema:
$ref: '#/definitions/Error'
/events/{id}:
get:
description: Returns an event based on a single ID
operationId: find event by id
parameters:
- name: id
in: path
description: ID of event to fetch
required: true
type: integer
format: int64
responses:
200:
description: Details of event
default:
description: unexpected error
schema:
$ref: '#/definitions/Error'
definitions:
Error:
required:
- code
- message
properties:
code:
type: integer
format: int32
message:
type: string