/
bikespace-open-api.yaml
85 lines (82 loc) · 1.99 KB
/
bikespace-open-api.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
openapi: 3.0.0
info:
version: 2.0.0
title: BikeSpace API
description: BikeSpace API
servers:
- url: http://127.0.0.1/api/v2
- url: https://api-dev.bikespace.ca/api/v2
paths:
/submissions:
get:
description: Returns a list of all the submitted answers
parameters:
- name: limit
in: query
description: Limits the number of items on a page
schema:
type: integer
- name: offset
in: query
description: Specifies the page number of the submissions to be displayed
schema:
type: integer
responses:
"200":
description: Successfully returned a list of submissions
content:
application/json:
schema:
$ref: '#/components/schemas/Submission'
"400":
description: Invalid request
content:
application/json:
schema:
type: object
properties:
message:
type: string
post:
summary: Submit a new submission
requestBody:
description: Create a new submission
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/Submission'
responses:
'201':
description: Created
components:
schemas:
Submission:
properties:
id:
type: integer
latitude:
type: number
longitude:
type: number
issues:
type: array
items:
type: string
enum:
- not_provided
- full
- damaged
- abandoned
- other
parking_duration:
type: string
enum:
- minutes
- hours
- overnight
- multiday
parking_time:
type: string
comments:
type: string