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

Update schema id URL from NABSA to MobilityData repo #158

Merged
merged 4 commits into from
Dec 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ The function is only compatible with Netlify Function (https://www.netlify.com/p

- check-systems

Check-systems is a CLI tool to validate the whole “systems.csv” from https://github.com/NABSA/gbfs locally
Check-systems is a CLI tool to validate the whole “systems.csv” from https://github.com/MobilityData/gbfs locally

# Code convention

Expand Down
8 changes: 4 additions & 4 deletions RULES.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ The validator will check for the presence of the files depending on the options
<img width="350" alt="tick boxes" src="https://user-images.githubusercontent.com/63653518/156194900-bab75f85-f681-43a4-84d3-08c9d6fed4df.png">


The Validator also checks the conditional requirement of the file `vehicle_types.json`: as per the [official GBFS specification](https://github.com/NABSA/gbfs/blob/master/gbfs.md#vehicle_typesjson), it is required of systems that include information about vehicle types in the `vehicle_status.json file`.
The Validator also checks the conditional requirement of the file `vehicle_types.json`: as per the [official GBFS specification](https://github.com/MobilityData/gbfs/blob/master/gbfs.md#vehicle_typesjson), it is required of systems that include information about vehicle types in the `vehicle_status.json file`.


# Fields presence and field types
## Required fields
Each file in GBFS has to be structured in a specific [output format](https://github.com/NABSA/gbfs/blob/master/gbfs.md#output-format).
Each file in GBFS has to be structured in a specific [output format](https://github.com/MobilityData/gbfs/blob/master/gbfs.md#output-format).
All the fields that are described as **required** in GBFS will be checked by the validator.
Some fields are required only if the parent field is defined, and this is considered a **conditionally required** field.

Expand Down Expand Up @@ -68,8 +68,8 @@ The following conditions are all covered by this validator:
`current_range_meters`

- **conditions that are not covered by this validator**
`num_docks_available` in station_status.json`: because it depends on something that isn't defined in the GBFS files: the docking capacity. See the official GBFS spec about this field [here](https://github.com/NABSA/gbfs/blob/master/gbfs.md#station_statusjson).\
`vehicle_docks_available` in station_status.json`: because it depends on something that isn't defined in the GBFS files: *REQUIRED in feeds where [...] certain docks are only able to accept certain vehicle types.* See the official GBFS spec about this field [here](https://github.com/NABSA/gbfs/blob/master/gbfs.md#station_statusjson).\
`num_docks_available` in station_status.json`: because it depends on something that isn't defined in the GBFS files: the docking capacity. See the official GBFS spec about this field [here](https://github.com/MobilityData/gbfs/blob/master/gbfs.md#station_statusjson).\
`vehicle_docks_available` in station_status.json`: because it depends on something that isn't defined in the GBFS files: *REQUIRED in feeds where [...] certain docks are only able to accept certain vehicle types.* See the official GBFS spec about this field [here](https://github.com/MobilityData/gbfs/blob/master/gbfs.md#station_statusjson).\
`system_id` in `free_bike_status.json`

## Field types
Expand Down
2 changes: 1 addition & 1 deletion check-systems/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# check-systems

Download systems.csv from https://github.com/NABSA/gbfs
Download systems.csv from https://github.com/MobilityData/gbfs

`node check-systems/index.js systems.csv`
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ module.exports = ({ vehicleTypes }) => {
partial.$merge = {
source: {
$ref:
'https://github.com/NABSA/gbfs/blob/v2.1/gbfs.md#free_bike_statusjson'
'https://github.com/MobilityData/gbfs/blob/v2.1/gbfs.md#free_bike_statusjson'
},
with: {
properties: {
Expand Down Expand Up @@ -49,7 +49,7 @@ module.exports = ({ vehicleTypes }) => {
partial.$patch = {
source: {
$ref:
'https://github.com/NABSA/gbfs/blob/v2.1/gbfs.md#free_bike_statusjson'
'https://github.com/MobilityData/gbfs/blob/v2.1/gbfs.md#free_bike_statusjson'
},
with: [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module.exports = ({ vehicleTypes }) => {
$merge: {
source: {
$ref:
'https://github.com/NABSA/gbfs/blob/v2.1/gbfs.md#station_statusjson'
'https://github.com/MobilityData/gbfs/blob/v2.1/gbfs.md#station_statusjson'
},
with: {
properties: {
Expand Down Expand Up @@ -33,7 +33,7 @@ module.exports = ({ vehicleTypes }) => {
$patch: {
source: {
$ref:
'https://github.com/NABSA/gbfs/blob/v2.1/gbfs.md#station_statusjson'
'https://github.com/MobilityData/gbfs/blob/v2.1/gbfs.md#station_statusjson'
},
with: [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module.exports = ({ android = false, ios = false }) => {
$patch: {
source: {
$ref:
'https://github.com/NABSA/gbfs/blob/v2.1/gbfs.md#system_informationjson'
'https://github.com/MobilityData/gbfs/blob/v2.1/gbfs.md#system_informationjson'
},
with: [
{
Expand All @@ -17,7 +17,7 @@ module.exports = ({ android = false, ios = false }) => {
$merge: {
source: {
$ref:
'https://github.com/NABSA/gbfs/blob/v2.1/gbfs.md#system_informationjson'
'https://github.com/MobilityData/gbfs/blob/v2.1/gbfs.md#system_informationjson'
},
with: {
properties: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ module.exports = ({ vehicleTypes }) => {
partial.$merge = {
source: {
$ref:
'https://github.com/NABSA/gbfs/blob/v2.2/gbfs.md#free_bike_statusjson'
'https://github.com/MobilityData/gbfs/blob/v2.2/gbfs.md#free_bike_statusjson'
},
with: {
properties: {
Expand Down Expand Up @@ -49,7 +49,7 @@ module.exports = ({ vehicleTypes }) => {
partial.$patch = {
source: {
$ref:
'https://github.com/NABSA/gbfs/blob/v2.2/gbfs.md#free_bike_statusjson'
'https://github.com/MobilityData/gbfs/blob/v2.2/gbfs.md#free_bike_statusjson'
},
with: [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module.exports = ({ vehicleTypes }) => {
$merge: {
source: {
$ref:
'https://github.com/NABSA/gbfs/blob/v2.2/gbfs.md#station_statusjson'
'https://github.com/MobilityData/gbfs/blob/v2.2/gbfs.md#station_statusjson'
},
with: {
properties: {
Expand Down Expand Up @@ -33,7 +33,7 @@ module.exports = ({ vehicleTypes }) => {
$patch: {
source: {
$ref:
'https://github.com/NABSA/gbfs/blob/v2.2/gbfs.md#station_statusjson'
'https://github.com/MobilityData/gbfs/blob/v2.2/gbfs.md#station_statusjson'
},
with: [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module.exports = ({ android = false, ios = false }) => {
$patch: {
source: {
$ref:
'https://github.com/NABSA/gbfs/blob/v2.2/gbfs.md#system_informationjson'
'https://github.com/MobilityData/gbfs/blob/v2.2/gbfs.md#system_informationjson'
},
with: [
{
Expand All @@ -17,7 +17,7 @@ module.exports = ({ android = false, ios = false }) => {
$merge: {
source: {
$ref:
'https://github.com/NABSA/gbfs/blob/v2.2/gbfs.md#system_informationjson'
'https://github.com/MobilityData/gbfs/blob/v2.2/gbfs.md#system_informationjson'
},
with: {
properties: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ module.exports = ({ vehicleTypes }) => {
partial.$merge = {
source: {
$ref:
'https://github.com/NABSA/gbfs/blob/v2.3/gbfs.md#free_bike_statusjson'
'https://github.com/MobilityData/gbfs/blob/v2.3/gbfs.md#free_bike_statusjson'
},
with: {
properties: {
Expand Down Expand Up @@ -49,7 +49,7 @@ module.exports = ({ vehicleTypes }) => {
partial.$patch = {
source: {
$ref:
'https://github.com/NABSA/gbfs/blob/v2.3/gbfs.md#free_bike_statusjson'
'https://github.com/MobilityData/gbfs/blob/v2.3/gbfs.md#free_bike_statusjson'
},
with: [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module.exports = ({ vehicleTypes }) => {
$merge: {
source: {
$ref:
'https://github.com/NABSA/gbfs/blob/v2.3/gbfs.md#station_statusjson'
'https://github.com/MobilityData/gbfs/blob/v2.3/gbfs.md#station_statusjson'
},
with: {
properties: {
Expand Down Expand Up @@ -33,7 +33,7 @@ module.exports = ({ vehicleTypes }) => {
$patch: {
source: {
$ref:
'https://github.com/NABSA/gbfs/blob/v2.3/gbfs.md#station_statusjson'
'https://github.com/MobilityData/gbfs/blob/v2.3/gbfs.md#station_statusjson'
},
with: [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module.exports = ({ android = false, ios = false }) => {
$patch: {
source: {
$ref:
'https://github.com/NABSA/gbfs/blob/v2.3/gbfs.md#system_informationjson'
'https://github.com/MobilityData/gbfs/blob/v2.3/gbfs.md#system_informationjson'
},
with: [
{
Expand All @@ -17,7 +17,7 @@ module.exports = ({ android = false, ios = false }) => {
$merge: {
source: {
$ref:
'https://github.com/NABSA/gbfs/blob/v2.3/gbfs.md#system_informationjson'
'https://github.com/MobilityData/gbfs/blob/v2.3/gbfs.md#system_informationjson'
},
with: {
properties: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module.exports = ({ pricingPlans }) => {
$merge: {
source: {
$ref:
'https://github.com/NABSA/gbfs/blob/v2.3/gbfs.md#vehicle_typesjson-added-in-v21-rc'
'https://github.com/MobilityData/gbfs/blob/v2.3/gbfs.md#vehicle_typesjson'
},
with: {
properties: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module.exports = ({ vehicleTypes }) => {
$merge: {
source: {
$ref:
'https://github.com/NABSA/gbfs/blob/v3.0-RC/gbfs.md#station_statusjson'
'https://github.com/MobilityData/gbfs/blob/v3.0-RC/gbfs.md#station_statusjson'
},
with: {
properties: {
Expand Down Expand Up @@ -33,7 +33,7 @@ module.exports = ({ vehicleTypes }) => {
$patch: {
source: {
$ref:
'https://github.com/NABSA/gbfs/blob/v3.0-RC/gbfs.md#station_statusjson'
'https://github.com/MobilityData/gbfs/blob/v3.0-RC/gbfs.md#station_statusjson'
},
with: [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module.exports = ({ android = false, ios = false }) => {
$patch: {
source: {
$ref:
'https://github.com/NABSA/gbfs/blob/v3.0-RC/gbfs.md#system_informationjson'
'https://github.com/MobilityData/gbfs/blob/v3.0-RC/gbfs.md#system_informationjson'
},
with: [
{
Expand All @@ -17,7 +17,7 @@ module.exports = ({ android = false, ios = false }) => {
$merge: {
source: {
$ref:
'https://github.com/NABSA/gbfs/blob/v3.0-RC/gbfs.md#system_informationjson'
'https://github.com/MobilityData/gbfs/blob/v3.0-RC/gbfs.md#system_informationjson'
},
with: {
properties: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ module.exports = ({ vehicleTypes }) => {
partial.$merge = {
source: {
$ref:
'https://github.com/NABSA/gbfs/blob/v3.0-RC/gbfs.md#vehicle_statusjson'
'https://github.com/MobilityData/gbfs/blob/v3.0-RC/gbfs.md#vehicle_statusjson'
},
with: {
properties: {
Expand Down Expand Up @@ -49,7 +49,7 @@ module.exports = ({ vehicleTypes }) => {
partial.$patch = {
source: {
$ref:
'https://github.com/NABSA/gbfs/blob/v3.0-RC/gbfs.md#vehicle_statusjson'
'https://github.com/MobilityData/gbfs/blob/v3.0-RC/gbfs.md#vehicle_statusjson'
},
with: [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module.exports = ({ pricingPlans }) => {
$merge: {
source: {
$ref:
'https://github.com/NABSA/gbfs/blob/v3.0-RC/gbfs.md#vehicle_typesjson-added-in-v21-rc'
'https://github.com/MobilityData/gbfs/blob/v3.0-RC/gbfs.md#vehicle_typesjson'
},
with: {
properties: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module.exports = ({ vehicleTypes }) => {
$merge: {
source: {
$ref:
'https://github.com/NABSA/gbfs/blob/v3.0-RC2/gbfs.md#station_statusjson'
'https://github.com/MobilityData/gbfs/blob/v3.0-RC2/gbfs.md#station_statusjson'
},
with: {
properties: {
Expand Down Expand Up @@ -33,7 +33,7 @@ module.exports = ({ vehicleTypes }) => {
$patch: {
source: {
$ref:
'https://github.com/NABSA/gbfs/blob/v3.0-RC2/gbfs.md#station_statusjson'
'https://github.com/MobilityData/gbfs/blob/v3.0-RC2/gbfs.md#station_statusjson'
},
with: [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module.exports = ({ android = false, ios = false }) => {
$patch: {
source: {
$ref:
'https://github.com/NABSA/gbfs/blob/v3.0-RC2/gbfs.md#system_informationjson'
'https://github.com/MobilityData/gbfs/blob/v3.0-RC2/gbfs.md#system_informationjson'
},
with: [
{
Expand All @@ -17,7 +17,7 @@ module.exports = ({ android = false, ios = false }) => {
$merge: {
source: {
$ref:
'https://github.com/NABSA/gbfs/blob/v3.0-RC2/gbfs.md#system_informationjson'
'https://github.com/MobilityData/gbfs/blob/v3.0-RC2/gbfs.md#system_informationjson'
},
with: {
properties: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ module.exports = ({ vehicleTypes }) => {
partial.$merge = {
source: {
$ref:
'https://github.com/NABSA/gbfs/blob/v3.0-RC2/gbfs.md#vehicle_statusjson'
'https://github.com/MobilityData/gbfs/blob/v3.0-RC2/gbfs.md#vehicle_statusjson'
},
with: {
properties: {
Expand Down Expand Up @@ -49,7 +49,7 @@ module.exports = ({ vehicleTypes }) => {
partial.$patch = {
source: {
$ref:
'https://github.com/NABSA/gbfs/blob/v3.0-RC2/gbfs.md#vehicle_statusjson'
'https://github.com/MobilityData/gbfs/blob/v3.0-RC2/gbfs.md#vehicle_statusjson'
},
with: [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module.exports = ({ pricingPlans }) => {
$merge: {
source: {
$ref:
'https://github.com/NABSA/gbfs/blob/v3.0-RC2/gbfs.md#vehicle_typesjson-added-in-v21-rc'
'https://github.com/MobilityData/gbfs/blob/v3.0-RC2/gbfs.md#vehicle_typesjson'
},
with: {
properties: {
Expand Down
2 changes: 1 addition & 1 deletion gbfs-validator/versions/schemas/v1.0/free_bike_status.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "https://github.com/NABSA/gbfs/blob/v1.0/gbfs.md#free_bike_statusjson",
"$id": "https://github.com/MobilityData/gbfs/blob/v1.0/gbfs.md#free_bike_statusjson",
"description": "Describes the vehicles that are available for rent (as of v2.1-RC2).",
"type": "object",
"properties": {
Expand Down
2 changes: 1 addition & 1 deletion gbfs-validator/versions/schemas/v1.0/gbfs.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "https://github.com/NABSA/gbfs/blob/v1.0/gbfs.md#gbfsjson",
"$id": "https://github.com/MobilityData/gbfs/blob/v1.0/gbfs.md#gbfsjson",
"description": "Auto-discovery file that links to all of the other files published by the system.",
"type": "object",
"properties": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "https://github.com/NABSA/gbfs/blob/v1.0/gbfs.md#station_informationjson",
"$id": "https://github.com/MobilityData/gbfs/blob/v1.0/gbfs.md#station_informationjson",
"description": "List of all stations, their capacities and locations. REQUIRED of systems utilizing docks.",
"type": "object",
"properties": {
Expand Down
2 changes: 1 addition & 1 deletion gbfs-validator/versions/schemas/v1.0/station_status.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "https://github.com/NABSA/gbfs/blob/v1.0/gbfs.md#station_statusjson",
"$id": "https://github.com/MobilityData/gbfs/blob/v1.0/gbfs.md#station_statusjson",
"description": "Describes the capacity and rental availability of the station",
"type": "object",
"properties": {
Expand Down
2 changes: 1 addition & 1 deletion gbfs-validator/versions/schemas/v1.0/system_alerts.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "https://github.com/NABSA/gbfs/blob/v1.0/gbfs.md#system_alertsjson",
"$id": "https://github.com/MobilityData/gbfs/blob/v1.0/gbfs.md#system_alertsjson",
"description": "Describes ad-hoc changes to the system.",
"type": "object",
"properties": {
Expand Down
2 changes: 1 addition & 1 deletion gbfs-validator/versions/schemas/v1.0/system_calendar.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "https://github.com/NABSA/gbfs/blob/v1.0/gbfs.md#system_calendarjson",
"$id": "https://github.com/MobilityData/gbfs/blob/v1.0/gbfs.md#system_calendarjson",
"description": "Describes the operating calendar for a system.",
"type": "object",
"properties": {
Expand Down
2 changes: 1 addition & 1 deletion gbfs-validator/versions/schemas/v1.0/system_hours.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "https://github.com/NABSA/gbfs/blob/v1.0/gbfs.md#system_hoursjson",
"$id": "https://github.com/MobilityData/gbfs/blob/v1.0/gbfs.md#system_hoursjson",
"description": "Describes the system hours of operation.",
"type": "object",
"properties": {
Expand Down
Loading
Loading