-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapi.yaml
173 lines (163 loc) · 4.32 KB
/
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
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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
openapi: 3.0.0
info:
title: Web Pages API
description: |
Web Pages only. For the data API see the appropriate documentation.
All POIs `id` or `ids` could be internal id (like `163458`), cartocode (`cartocode:A1`), external data source reference (`ref:[source-slug]:224402` where `[source-slug]` must be replaced with the slug of the data source) or OpenStreetMap id (`osm:w122937626` where the first char is the type `n`, `w` or `r` and followed by the numeric identifier).
version: v0.1.0
contact:
email: contact@teritorio.fr
servers:
- url: /
paths:
/:
get:
tags:
- map
summary: Homepage.
parameters:
- &home_paramter_map
in: query
name: map
schema:
type: string
description: Map center location. Latitude, longitude, zoom.
example: 7/44.055/0.056
- &home_paramter_mode
in: query
name: mode
schema:
type: string
enum: [browser, explorer, favorites]
default: browser
description: Map mode. Default browse categories from menu. Explore directly the map or show favourites.
example: browser
- &home_paramter_favs
in: query
name: favs
schema:
type: string
description: Comma-speparated list of POIs (id, ref...) to be set as favorites.
example: 543,765789
- &home_paramter_bg
in: query
name: bg
schema:
type: string
enum: [vector, raster, aerial]
default: vector
description: Background map.
responses:
'200':
description: OK
/{category_ids}/:
get:
tags:
- map
summary: Homepage with selected categories.
parameters:
- &home_paramter_category_ids
in: path
name: category_ids
schema:
type: array
items:
type: string
required: true
description: A comma-separated list of active categories ids.
example: 234,655,78
- *home_paramter_map
- *home_paramter_mode
- *home_paramter_favs
- *home_paramter_bg
responses:
'200':
description: OK
/{poi_id}:
get:
tags:
- map
summary: Homepage with pinned POI.
parameters:
- &home_paramter_poi_id
in: path
name: poi_id
schema:
type: string
required: true
description: The current highlighted POI.
example: 543
- *home_paramter_map
- *home_paramter_mode
- *home_paramter_favs
- *home_paramter_bg
responses:
'200':
description: OK
/{category_ids}/{poi_id}:
get:
tags:
- map
summary: Homepage with selected categories and pinned POI.
parameters:
- *home_paramter_poi_id
- *home_paramter_category_ids
- *home_paramter_map
- *home_paramter_mode
- *home_paramter_favs
- *home_paramter_bg
responses:
'200':
description: OK
/pois/{ids}/map:
get:
tags:
- map
summary: Full page map with POIs. Intended to be included as iframe.
parameters:
- in: path
name: ids
schema:
type: array
items:
type: string
required: true
responses:
'200':
description: OK
/embedded:
get:
tags:
- map
summary: Simplified main map for embedded on iframe.
responses:
'200':
description: OK
/poi/{id}/details:
get:
tags:
- details
summary: POI full details page with description, images, map...
parameters:
- in: path
name: id
schema:
type: string
required: true
responses:
'200':
description: OK
/category/{id}:
get:
tags:
- category
summary: List of POIs of a category.
parameters:
- in: path
name: id
schema:
type: string
required: true
responses:
'200':
description: OK