Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add 3.0-RC2 schemas #100

Merged
merged 37 commits into from
Nov 15, 2023
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
7ac0fc5
3.0-RC2: copy from 3.0-RC
tdelmas Nov 8, 2023
03f5698
Timestamp fields MUST be represented as strings in RFC3339 format (as…
tdelmas Nov 13, 2023
045da84
`termination_date`
tdelmas Nov 13, 2023
287a717
vehicle_types_capacity/vehicle_docks_capacity/vehicle_type_ids
tdelmas Nov 13, 2023
6583652
interval type `float`
tdelmas Nov 13, 2023
89e8406
Geofencing Rule: vehicle_type_ids
tdelmas Nov 13, 2023
79817dd
eco_labels
tdelmas Nov 14, 2023
0cd1046
RFC3339 format
tdelmas Nov 14, 2023
9b4c3f4
RFC3339 format
tdelmas Nov 14, 2023
142c87d
RFC3339 format
tdelmas Nov 14, 2023
0dc685a
RFC3339 format
tdelmas Nov 14, 2023
7248bae
RFC3339 format
tdelmas Nov 14, 2023
544bd6f
vehicle_type_id
tdelmas Nov 14, 2023
fe5d2de
vehicle_type_ids
tdelmas Nov 14, 2023
d3d621f
vehicle_type_ids
tdelmas Nov 14, 2023
e2671f9
vehicle_type_ids
tdelmas Nov 14, 2023
fe8e201
description
tdelmas Nov 14, 2023
7cc2f07
description
tdelmas Nov 14, 2023
cea869f
description
tdelmas Nov 14, 2023
2ebf465
RFC3339 format
tdelmas Nov 14, 2023
42755ff
version: `"enum": ["3.0-RC", "3.0-RC2", "3.0"]`
tdelmas Nov 14, 2023
e838600
description
tdelmas Nov 14, 2023
8689e9a
description
tdelmas Nov 14, 2023
0a495aa
Revert "version: `"enum": ["3.0-RC", "3.0-RC2", "3.0"]`"
tdelmas Nov 15, 2023
a6bcf74
add "3.0-RC2" to data.versions enums
tdelmas Nov 15, 2023
75fe05a
RFC3339 format
tdelmas Nov 15, 2023
fc32448
RFC3339 format
tdelmas Nov 15, 2023
987fe7c
RFC3339 format
tdelmas Nov 15, 2023
b01bf32
RFC3339 format
tdelmas Nov 15, 2023
ba66dd4
RFC3339 format
tdelmas Nov 15, 2023
b25ef71
RFC3339 format
tdelmas Nov 15, 2023
43cf86a
RFC3339 format
tdelmas Nov 15, 2023
f39fd6f
RFC3339 format
tdelmas Nov 15, 2023
0d31c88
RFC3339 format
tdelmas Nov 15, 2023
e546a05
RFC3339 format
tdelmas Nov 15, 2023
38eb546
RFC3339 format
tdelmas Nov 15, 2023
393081b
vehicle_type_ids
tdelmas Nov 15, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions v1.1/gbfs_versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
"2.2",
"2.3",
"3.0-RC",
"3.0-RC2",
"3.0"
]
},
Expand Down
1 change: 1 addition & 0 deletions v2.0/gbfs_versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
"2.2",
"2.3",
"3.0-RC",
"3.0-RC2",
"3.0"
]
},
Expand Down
1 change: 1 addition & 0 deletions v2.1/gbfs_versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
"2.2",
"2.3",
"3.0-RC",
"3.0-RC2",
"3.0"
]
},
Expand Down
1 change: 1 addition & 0 deletions v2.2/gbfs_versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
"2.2",
"2.3",
"3.0-RC",
"3.0-RC2",
"3.0"
]
},
Expand Down
1 change: 1 addition & 0 deletions v2.3/gbfs_versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
"2.2",
"2.3",
"3.0-RC",
"3.0-RC2",
"3.0"
]
},
Expand Down
64 changes: 64 additions & 0 deletions v3.0-RC2/gbfs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
{
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "https://github.com/NABSA/gbfs/blob/v3.0-RC2/gbfs.md#gbfsjson",
"description": "Auto-discovery file that links to all of the other files published by the system.",
"type": "object",
"properties": {
"last_updated": {
"description": "Last time the data in the feed was updated in POSIX time.",
tdelmas marked this conversation as resolved.
Show resolved Hide resolved
"type": "string",
"format": "date-time"
},
"ttl": {
"description": "Number of seconds before the data in the feed will be updated again (0 if the data should always be refreshed).",
"type": "integer",
"minimum": 0
},
"version": {
"description": "GBFS version number to which the feed conforms, according to the versioning framework (added in v1.1).",
"type": "string",
"enum": ["3.0-RC", "3.0-RC2", "3.0"]
},
"data": {
"type": "object",
"properties": {
"feeds": {
"description": "An array of all of the feeds that are published by the auto-discovery file. Each element in the array is an object with the keys below.",
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"description": "Key identifying the type of feed this is. The key must be the base file name defined in the spec for the corresponding feed type.",
"type": "string",
"enum": [
"gbfs",
"gbfs_versions",
"system_information",
"vehicle_types",
"station_information",
"station_status",
"vehicle_status",
"system_alerts",
"system_regions",
"system_pricing_plans",
"geofencing_zones"
]
},
"url": {
"description": "URL for the feed.",
"type": "string",
"format": "uri"
}
},
"required": ["name", "url"]
},
"minItems": 1
}
},
"required": ["feeds"]
}
},
"additionalProperties": false,
"required": ["last_updated", "ttl", "version", "data"]
}
62 changes: 62 additions & 0 deletions v3.0-RC2/gbfs_versions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "https://github.com/NABSA/gbfs/blob/v3.0-RC2/gbfs.md#gbfs_versionsjson-added-in-v11",
"description": "Lists all feed endpoints published according to version sof the GBFS documentation. (added in v1.1)",
"type": "object",
"properties": {
"last_updated": {
"description": "Last time the data in the feed was updated in POSIX time.",
tdelmas marked this conversation as resolved.
Show resolved Hide resolved
"type": "string",
"format": "date-time"
},
"ttl": {
"description": "Number of seconds before the data in the feed will be updated again (0 if the data should always be refreshed).",
"type": "integer",
"minimum": 0
},
"version": {
"description": "GBFS version number to which the feed conforms, according to the versioning framework.",
"type": "string",
"enum": ["3.0-RC", "3.0-RC2", "3.0"]
},
"data": {
"description": "Response data in the form of name:value pairs.",
"type": "object",
"properties": {
"versions": {
"description": "Contains one object, as defined below, for each of the available versions of a feed. The array must be sorted by increasing MAJOR and MINOR version number.",
"type": "array",
"items": {
"type": "object",
"properties": {
"version": {
"description": "The semantic version of the feed in the form X.Y",
"type": "string",
"enum": [
"1.0",
"1.1",
"2.0",
"2.1",
"2.2",
"2.3",
"3.0-RC",
"3.0-RC2",
"3.0"
]
},
"url": {
"description": "URL of the corresponding gbfs.json endpoint",
"type": "string",
"format": "uri"
}
},
"required": ["version", "url"]
}
}
},
"required": ["versions"],
"additionalProperties": false
}
},
"required": ["last_updated", "ttl", "version", "data"]
}
202 changes: 202 additions & 0 deletions v3.0-RC2/geofencing_zones.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,202 @@
{
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "https://github.com/NABSA/gbfs/blob/v3.0-RC2/gbfs.md#geofencing_zonesjson",
"description": "Describes geofencing zones and their associated rules and attributes (added in v2.1-RC).",
"type": "object",
"properties": {
"last_updated": {
"description": "Last time the data in the feed was updated in POSIX time.",
tdelmas marked this conversation as resolved.
Show resolved Hide resolved
"type": "string",
"format": "date-time"
},
"ttl": {
"description": "Number of seconds before the data in the feed will be updated again (0 if the data should always be refreshed).",
"type": "integer",
"minimum": 0
},
"version": {
"description": "GBFS version number to which the feed conforms, according to the versioning framework.",
"type": "string",
"enum": ["3.0-RC", "3.0-RC2", "3.0"]
},
"data": {
"description": "Array that contains geofencing information for the system.",
"type": "object",
"properties": {
"geofencing_zones": {
"type": "object",
"description": "Each geofenced zone and its associated rules and attributes is described as an object within the array of features.",
"properties": {
"type": {
"description": "FeatureCollection as per IETF RFC 7946.",
"type": "string",
"enum": ["FeatureCollection"]
},
"features": {
"description": "Array of objects.",
"type": "array",
"items": {
"title": "GeoJSON Feature",
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": ["Feature"]
},
"properties": {
"description": "Describing travel allowances and limitations.",
"type": "object",
"properties": {
"name": {
"description": "Public name of the geofencing zone.",
"type": "array",
"items": {
"type": "object",
"properties": {
"text": {
"description": "The translated text.",
"type": "string"
},
"language": {
"description": "IETF BCP 47 language code.",
"type": "string",
"pattern": "^[a-z]{2,3}(-[A-Z]{2})?$"
}
},
"required": ["text", "language"]
}
},
"start": {
"description": "Start time of the geofencing zone in POSIX time.",
tdelmas marked this conversation as resolved.
Show resolved Hide resolved
"type": "string",
"format": "date-time"
},
"end": {
"description": "End time of the geofencing zone in POSIX time.",
tdelmas marked this conversation as resolved.
Show resolved Hide resolved
"type": "string",
"format": "date-time"
},
"rules": {
"description": "Array of Rule objects defining restrictions that apply within the area of the polygon.",
"type": "array",
"items": {
"type": "object",
"properties": {
"vehicle_type_ids": {
"type": "array",
"description": "Array of vehicle type IDs for which these restrictions apply.",
"items": { "type": "string" }
},
"ride_start_allowed": {
"description": "Is the ride allowed to start in this zone?",
"type": "boolean"
},
"ride_end_allowed": {
"description": "Is the ride allowed to end in this zone?",
"type": "boolean"
},
"ride_through_allowed": {
"description": "Is the ride allowed to travel through this zone?",
"type": "boolean"
},
"maximum_speed_kph": {
"description": "What is the maximum speed allowed, in kilometers per hour?",
"type": "integer",
"minimum": 0
},
"station_parking": {
"description": "Vehicle MUST be parked at stations defined in station_information.json within this geofence zone",
"type": "boolean"
}
},
"required": [
"ride_start_allowed",
"ride_end_allowed",
"ride_through_allowed"
]
}
}
}
},
"geometry": {
"description": "A polygon that describes where rides might not be able to start, end, go through, or have other limitations. Must follow the right-hand rule.",
"title": "GeoJSON MultiPolygon",
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": ["MultiPolygon"]
},
"coordinates": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "array",
"minItems": 4,
"items": {
"type": "array",
"minItems": 2,
"items": {
"type": "number"
}
}
}
}
}
},
"required": ["type", "coordinates"]
}
},
"required": ["type", "geometry", "properties"]
}
}
},
"required": ["type", "features"]
},
"global_rules": {
"description": "Array of Rule objects defining restrictions that apply globally in all areas as the default restrictions, except where overridden with an explicit geofencing zone.",
"type": "array",
"items": {
"type": "object",
"properties": {
"vehicle_type_id": {
tdelmas marked this conversation as resolved.
Show resolved Hide resolved
"type": "array",
"description": "Array of vehicle type IDs for which these restrictions apply.",
"items": { "type": "string" }
},
"ride_start_allowed": {
"description": "Is the ride allowed to start in this zone?",
"type": "boolean"
},
"ride_end_allowed": {
"description": "Is the ride allowed to end in this zone?",
"type": "boolean"
},
"ride_through_allowed": {
"description": "Is the ride allowed to travel through this zone?",
"type": "boolean"
},
"maximum_speed_kph": {
"description": "What is the maximum speed allowed, in kilometers per hour?",
"type": "integer",
"minimum": 0
},
"station_parking": {
"description": "Vehicle MUST be parked at stations defined in station_information.json within this geofence zone",
"type": "boolean"
}
},
"required": [
"ride_start_allowed",
"ride_end_allowed",
"ride_through_allowed"
]
}
}
},
"required": ["geofencing_zones", "global_rules"]
}
},
"required": ["last_updated", "ttl", "version", "data"]
}
Loading
Loading