-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathopenapi3.yml
99 lines (97 loc) · 2.78 KB
/
openapi3.yml
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
# SPDX-FileCopyrightText: NOI Techpark <digital@noi.bz.it>
#
# SPDX-License-Identifier: CC0-1.0
openapi: 3.0.3
info:
title: Open Data Hub GTFS API
description: >
API to retrieve GTFS files and related metadata.
termsOfService: https://docs.opendatahub.com/en/latest/licenses.html#apis-terms-of-service
contact:
name: Open Data Hub
url: https://opendatahub.com
email: help@opendatahub.com
license:
name: API License
url: https://docs.opendatahub.com/en/latest/licenses.html
version: V1
servers:
- url: __API_BASE_URL__/v1
paths:
/dataset:
get:
summary: Get all available datasets
responses:
200:
description: List of dataset metadata
content:
application/json:
schema:
$ref: "#/components/schemas/dataset-map"
/dataset/{datasetId}:
get:
summary: Get metadata of specific dataset by ID
parameters:
- $ref: "#/components/parameters/datasetId"
responses:
200:
description: List of dataset metadata
content:
application/json:
schema:
$ref: "#/components/schemas/dataset"
400:
description: Invalid dataset ID
/dataset/{datasetId}/raw:
get:
summary: Download the raw GTFS (.zip) file
parameters:
- $ref: "#/components/parameters/datasetId"
responses:
200:
description: Raw GTFS file
x-is-file: true
content:
application/zip:
schema:
type: string
format: binary
400:
description: Invalid dataset ID
components:
parameters:
datasetId:
name: datasetId
in: path
required: true
description: Dataset ID, as returned in the /v1/dataset/ call
schema:
type: string
schemas:
dataset-map:
type: object
description: Map of datasets by ID (id, dataset). `skyalps-flight-data` and `sta-time-tables` are example IDs
properties:
skyalps-flight-data:
$ref: "#/components/schemas/dataset"
sta-time-tables:
$ref: "#/components/schemas/dataset"
ummadumm-data:
$ref: "#/components/schemas/dataset"
dataset:
type: object
description: Metadata of a GTFS dataset
properties:
description:
type: string
description: A short description of the dataset
origin:
type: string
description: The provider of the dataset
license:
type: string
description: License under which the dataset is published
metadata:
type: object
description: A free form JSON object that may contain additional metadata
additionalProperties: true