Skip to content

Commit

Permalink
Squashed 'gbfs-validator/versions/schemas/' changes from 5273f96..22b…
Browse files Browse the repository at this point in the history
…058d

22b058d fix: incorrect spec for "languages" property in system_information.json (MobilityData#90)
e9d891b Refer to later versions in gbfs_versions.json (MobilityData#87)
fbd3ced Add v3.0 to v3.0-RC schemas (MobilityData#88)
ef0d9a6 Fix schemas for v3.0-RC (MobilityData#85)
2b6ad1e FIX: replaces name field with localized string (MobilityData#82)
abe71f2 Fix invalid json, no trailing commas (MobilityData#83)
f43170e V3.0-RC Schemas  (MobilityData#79)
680df70 Update pr-to-project.yml
c2c30a2 Typo fix in geofencing_zones.json (MobilityData#78)
c9be765 Create pr-to-project.yml
0a17875 Create issues-to-project.yml
30e5a3a Update README.md

git-subtree-dir: gbfs-validator/versions/schemas
git-subtree-split: 22b058dc4a358baf451e006cde74775075929b3d
  • Loading branch information
tdelmas committed Jun 28, 2023
1 parent 51aaaf7 commit af854e3
Show file tree
Hide file tree
Showing 23 changed files with 3,012 additions and 10 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/issues-to-project.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Add issues to project

on:
issues:
types:
- opened

jobs:
add-to-project:
name: Add issue to project
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
with:
# You can target a repository in a different organization
# to the issue
project-url: https://github.com/orgs/MobilityData/projects/58
github-token: ${{ secrets.GBFS_REPOS_CURRENT_STATUS }}
17 changes: 17 additions & 0 deletions .github/workflows/pr-to-project.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Add PRs to project

on:
pull_request:
types:
- opened

jobs:
add-to-project:
name: Add issue to project
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
with:
# You can target a repository in a different organization to the issue
project-url: https://github.com/orgs/MobilityData/projects/58
github-token: ${{ secrets.GBFS_REPOS_CURRENT_STATUS }}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# gbfs-json-schema
JSON Schema for [General Bikeshare Feed](https://github.com/NABSA/gbfs/blob/master/gbfs.md) Specification(GBFS) feeds, managed by MobilityData. The [gbfs-validator](https://github.com/MobilityData/gbfs-validator) links directly to them.
JSON Schema for [General Bikeshare Feed Specification(GBFS)](https://github.com/MobilityData/gbfs/blob/master/gbfs.md) feeds, managed by MobilityData. The [gbfs-validator](https://github.com/MobilityData/gbfs-validator) links directly to them.
8 changes: 7 additions & 1 deletion v1.1/gbfs_versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,13 @@
"type": "string",
"enum": [
"1.0",
"1.1"
"1.1",
"2.0",
"2.1",
"2.2",
"2.3",
"3.0-RC",
"3.0"
]
},
"url": {
Expand Down
7 changes: 6 additions & 1 deletion v2.0/gbfs_versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,12 @@
"enum": [
"1.0",
"1.1",
"2.0"
"2.0",
"2.1",
"2.2",
"2.3",
"3.0-RC",
"3.0"
]
},
"url": {
Expand Down
6 changes: 5 additions & 1 deletion v2.1/gbfs_versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,11 @@
"1.0",
"1.1",
"2.0",
"2.1"
"2.1",
"2.2",
"2.3",
"3.0-RC",
"3.0"
]
},
"url": {
Expand Down
3 changes: 2 additions & 1 deletion v2.1/geofencing_zones.json
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,8 @@
},
"required": ["type", "features"]
}
}
},
"required": ["geofencing_zones"]
}
},
"required": ["last_updated", "ttl", "version", "data"]
Expand Down
5 changes: 4 additions & 1 deletion v2.2/gbfs_versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@
"1.1",
"2.0",
"2.1",
"2.2"
"2.2",
"2.3",
"3.0-RC",
"3.0"
]
},
"url": {
Expand Down
3 changes: 2 additions & 1 deletion v2.2/geofencing_zones.json
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,8 @@
},
"required": ["type", "features"]
}
}
},
"required": ["geofencing_zones"]
}
},
"required": ["last_updated", "ttl", "version", "data"]
Expand Down
4 changes: 3 additions & 1 deletion v2.3/gbfs_versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@
"2.0",
"2.1",
"2.2",
"2.3"
"2.3",
"3.0-RC",
"3.0"
]
},
"url": {
Expand Down
5 changes: 3 additions & 2 deletions v2.3/geofencing_zones.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
"items": { "type": "string" }
},
"ride_allowed": {
"description": "Is the undocked ride allowed to stat and end in this zone?",
"description": "Is the undocked ride allowed to start and end in this zone?",
"type": "boolean"
},
"ride_through_allowed": {
Expand Down Expand Up @@ -137,7 +137,8 @@
},
"required": ["type", "features"]
}
}
},
"required": ["geofencing_zones"]
}
},
"required": ["last_updated", "ttl", "version", "data"]
Expand Down
70 changes: 70 additions & 0 deletions v3.0-RC/gbfs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
{
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "https://github.com/NABSA/gbfs/blob/v3.0-RC/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.",
"type": "integer",
"minimum": 1450155600
},
"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"
]
},
"data": {
"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"]
}
},
"required": true
}
},
"required": true
},
"additionalProperties": false,
"required": ["last_updated", "ttl", "version", "data"]
}
69 changes: 69 additions & 0 deletions v3.0-RC/gbfs_versions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
{
"$schema": "http://json-schema.org/draft-07/schema",
"$id":
"https://github.com/NABSA/gbfs/blob/v3.0-RC/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.",
"type": "integer",
"minimum": 1450155600
},
"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"
]
},
"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"
]
},
"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"]
}
Loading

0 comments on commit af854e3

Please sign in to comment.