-
Notifications
You must be signed in to change notification settings - Fork 0
/
spec.yaml
205 lines (203 loc) · 5.4 KB
/
spec.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
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
swagger: '2.0'
info:
version: 0.0.1
title: Kartozoa
description: Simple Kartotherian Tile Server Remix
contact:
name: Lucas Leblow
email: [email protected]
license:
name: Apache2
url: http://www.apache.org/licenses/LICENSE-2.0
paths:
# from routes/root.js
/robots.txt:
get:
tags:
- Root
- Robots
description: Gets robots.txt
x-amples:
- title: robots.txt check
request: {}
response:
status: 200
headers:
user-agent: '*'
disallow: '/'
/:
get:
tags:
- Root
description: The root service end-point returns either an html rendering of the API spec or a json version with the spec=true query parameter
produces:
- text/html
- application/json
x-amples:
- title: root with no query params
request: {}
response:
status: 404
- title: spec from root
request:
query:
spec: true
response:
status: 200
- title: root with wrong query param
request:
query:
fooo: true
response:
status: 404
# from routes/info.js
/_info:
get:
tags:
- Service information
description: Gets information about the service
produces:
- application/json
x-amples:
- title: retrieve service info
request: {}
response:
status: 200
headers:
content-type: application/json
body:
name: /.+/
description: /.+/
version: /.+/
home: /.+/
/_info/name:
get:
tags:
- Service information
- Service name
description: Gets the name of the service
produces:
- application/json
x-amples:
- title: retrieve service name
request: {}
response:
status: 200
headers:
content-type: application/json
body:
name: /.+/
/_info/version:
get:
tags:
- Service information
- Service version
description: Gets the running version of the service
produces:
- application/json
x-amples:
- title: retrieve service version
request: {}
response:
status: 200
headers:
content-type: application/json
body:
version: /.+/
/_info/home:
get:
tags:
- Service information
- Service homepage
description: Redirects to the home page
x-amples:
- title: redirect to the home page
request: {}
response:
status: 301
# from routes/kartozoa.js
/{src}/{z}/{x}/{y}.{format}:
get:
description: Returns a tile based on source, zoom, coordinates, and format. Possible values for the various parameters depend on the Kartotherian sources configuration (see https://github.com/kartotherian/kartotherian-core#sources)
produces:
- application/octet-stream
- application/json
- image/png
- image/jpeg
- image/svg+xml
- text/html
parameters:
- name: src
in: path
description: Tile source name
type: string
- name: z
in: path
description: Zoom level of the tile
type: integer
- name: x
in: path
description: X coordinate of the tile
type: integer
- name: 'y'
in: path
description: Y coordinate of the tile
type: integer
- name: format
in: path
description: File format of the tile
type: string
/{src}/{z}/{x}/{y}@{scale}x.{format}:
get:
description: Returns a tile based on source, zoom, coordinates, scale, and format. Possible values for the various parameters depend on the Kartotherian sources configuration (see https://github.com/kartotherian/kartotherian-core#sources)
produces:
- application/octet-stream
- application/json
- image/png
- image/jpeg
- image/svg+xml
- text/html
parameters:
- name: src
in: path
description: Tile source name
type: string
- name: z
in: path
description: Zoom level of the tile
type: integer
- name: x
in: path
description: X coordinate of the tile
type: integer
- name: 'y'
in: path
description: Y coordinate of the tile
type: integer
- name: scale
in: path
description: Scale for rendering larger images to high resolution screens
type: number
- name: format
in: path
description: File format of the tile
type: string
/{src}/{info}.json:
get:
description: Returns information on a given source
produces:
- application/json
parameters:
- name: src
in: path
description: Tile source name (see https://github.com/kartotherian/kartotherian-core#sources)
type: string
- name: info
in: path
description: Either 'pbfinfo' for a pbf source or 'info' for an image source
type: string
/preview:
get:
description: Returns a preview slippy map of the server's tiles
produces:
- text/html