-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnetexSweden.yaml
More file actions
203 lines (192 loc) · 8.75 KB
/
netexSweden.yaml
File metadata and controls
203 lines (192 loc) · 8.75 KB
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
openapi: 3.0.1
info:
title: NeTEx Regional Static
description: 'This API provides a static NeTEx dataset of high quality for Swedish public transport. The data is provided by Samtrafiken. All endpoints support HEAD requests and conditional GET requests. You can use these to determine if a new file is available.'
contact:
name: Trafiklab.se
url: https://support.trafiklab.se
license:
name: This documentation is licensed under a CC4.0-BY-SA license.
url: https://creativecommons.org/licenses/by-sa/4.0/
version: 1.0.0
externalDocs:
description: Read the complete Trafiklab docs
url: https://trafiklab.se
servers:
- url: https://opendata.samtrafiken.se/
tags:
- name: NeTEx
description: Fetch NeTEx dataset for Swedish public transport.
externalDocs:
description: Find out more
url: https://www.trafiklab.se/api/trafiklab-apis/netex-regional/
paths:
/netex-sweden/sweden.zip:
get:
tags:
- NeTEx
summary: 'Obtain a static NeTEx dataset.'
description: 'A static NeTEx dataset can be obtained through this endpoint.'
operationId: fetchGtfsArchive
parameters:
- $ref: '#/components/parameters/Accept-encoding'
- $ref: '#/components/parameters/If-Modified-Since'
- $ref: '#/components/parameters/If-None-Match'
responses:
200:
$ref: "#/components/responses/200-zip"
304:
$ref: "#/components/responses/304"
403:
$ref: "#/components/responses/403"
404:
$ref: "#/components/responses/404"
429:
$ref: "#/components/responses/429"
security:
- api_key: []
components:
parameters:
Accept-encoding:
name: Accept-encoding
in: header
description: "The Accept-Encoding request HTTP header advertises which content encoding, usually a compression algorithm, the client is able to understand.
Using content negotiation, the server selects one of the proposals, uses it and informs the client of its choice with the Content-Encoding response header.
*This API requires client-side GZIP support.*
Read more: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-encoding"
schema:
type: string
example: 'br, gzip, deflate'
required: true
If-Modified-Since:
name: If-Modified-Since
in: header
schema:
$ref: '#/components/schemas/http-date'
required: false
description: "The If-Modified-Since request HTTP header makes the request conditional: the server will send back the requested resource, with a 200 status, only if it has been last modified after the given date.
If the request has not been modified since, the response will be a 304 without any body; the Last-Modified response header of a previous request will contain the date of last modification. Read more: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-Modified-Since"
If-None-Match:
name: If-None-Match
in: header
description: "The If-None-Match HTTP request header makes the request conditional. For GET and HEAD methods, the server will send back the requested resource, with a 200 status, only if it doesn't have an ETag matching the given ones.
When the condition fails for GET and HEAD methods, then the server must return HTTP status code 304 (Not Modified). Read more: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-None-Match"
schema:
type: string
example: '"bfc13a64729c4290ef5b2c2730249c88ca92d82d"'
required: false
headers:
Cache-control:
description: "The cache-control contains a max-age field to define how long the content is considered fresh, in seconds, relative to the request time. New data will only become available after this interval has expired. Read more: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/cache-control"
schema:
type: string
example: 'public, max-age=65844'
Content-encoding:
description: "The Content-Encoding entity header is used to compress the media-type. When present, its value indicates which encodings were applied to the entity-body. It lets the client know how to decode in order to obtain the media-type referenced by the Content-Type header. Read more: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Encoding"
schema:
type: string
example: "gzip"
Date:
description: "The Date general HTTP header contains the date and time at which the message was originated. It gives information about an HTTP message, not about the contents of the message. Read more: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Date"
schema:
$ref: '#/components/schemas/http-date'
example: 'Mon, 13 Jul 2020 10:07:12 GMT'
ETag:
description: "The etag header contains a fingerpring of the file contents. It can be used in combination with the If-None-Match request header to only fetch the file when it has changed. Read more: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/ETag"
schema:
type: string
example: '"046c1da6f11e08a6f32c22838787b950"'
Expires:
description: "The Expires header contains the date/time after which the response is considered stale. Invalid dates, like the value 0, represent a date in the past and mean that the resource is already expired. A stale resource can still be used, but a newer version might be available on the server. Read more: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Expires"
schema:
$ref: '#/components/schemas/http-date'
example: 'Tue, 14 Jul 2020 04:24:36 GMT'
Last-modified:
description: "The Last-Modified response HTTP header contains the date and time at which the origin server believes the resource was last modified. It is used in combination with the if-modified-since request header to determine if the server has newer data compared to the client. Read more: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/last-modified"
schema:
$ref: '#/components/schemas/http-date'
example: 'Mon, 13 Jul 2020 04:24:36 GMT'
responses:
'200-zip':
description: The request succeeded.
headers:
Cache-control:
$ref: '#/components/headers/Cache-control'
Content-encoding:
$ref: '#/components/headers/Content-encoding'
Date:
$ref: '#/components/headers/Date'
ETag:
$ref: '#/components/headers/ETag'
Expires:
$ref: '#/components/headers/Expires'
Last-modified:
$ref: '#/components/headers/Last-modified'
content:
application/zip:
schema:
type: string
format: binary
'304':
description: The data on the server has not been modified.
headers:
Cache-control:
$ref: '#/components/headers/Cache-control'
Content-encoding:
$ref: '#/components/headers/Content-encoding'
Date:
$ref: '#/components/headers/Date'
ETag:
$ref: '#/components/headers/ETag'
Expires:
$ref: '#/components/headers/Expires'
Last-modified:
$ref: '#/components/headers/Last-modified'
'403':
description: No API key was provided, or the provided API key is invalid.
headers:
Content-encoding:
$ref: '#/components/headers/Content-encoding'
Date:
$ref: '#/components/headers/Date'
content:
$ref: '#/components/schemas/json-error-details'
'404':
description: The requested file does not exist.
headers:
Content-encoding:
$ref: '#/components/headers/Content-encoding'
Date:
$ref: '#/components/headers/Date'
content:
$ref: '#/components/schemas/json-error-details'
'429':
description: The provided API key has exceeded its quota
headers:
Content-encoding:
$ref: '#/components/headers/Content-encoding'
Date:
$ref: '#/components/headers/Date'
content:
$ref: '#/components/schemas/json-error-details'
schemas:
http-date:
title: "HTTP Date, RFC2616"
type: string
format: '<day-name>, <day> <month> <year> <hour>:<minute>:<second> GMT'
example: 'Mon, 13 Jul 2020 04:24:36 GMT'
description: "HTTP date, see RFC2616 section 3.3: https://tools.ietf.org/html/rfc2616"
json-error-details:
title: "JSON error message"
type: object
example: '{"errorMessage":"Key \"123456\" is invalid"}'
properties:
errorMessage:
type: string
description: The error message.
example: "Key \"123456\" is invalid"
securitySchemes:
api_key:
type: apiKey
name: key
in: query