Home

Awesome

GBFS-validator

All Contributors

A General Bikeshare Feed Specification dataset validator

Introduction

The Canonical GBFS Validator is a tool to check the conformity of a GBFS feed against the official specification. It validates feeds up to GBFS version 3.0. This tool is built using the JSON Schemas, and the site is powered by Netlify.

interface

The schemas in gbfs-validator/versions/gbfs-json-schema is a git submodule of https://github.com/MobilityData/gbfs-json-schema.

Questions? Please open an issue or reach out on the #gbfs channel on the MobilityData Slack.

Run the app

The validator is developed to be used “online” (hosted with a lambda function).

  1. Open https://gbfs-validator.mobilitydata.org
  2. Enter the feed’s auto-discovery URL
  3. If needed, select the version. If not specified, the validator will pick the version mentioned in the gbfs.json file
  4. Select file requirement options (free-floating or docked)
  5. Click the “Validate me !” button, and see the validation results below

Validation rules

The validation rules are listed in RULES.md Have a suggestion for a new rule? Open an issue!

Build the project: Web server install procedure

Required

To build the project locally, you need:

brew install node
npm install --global yarn

Run dev environment

git clone https://github.com/MobilityData/gbfs-validator.git
cd gbfs-validator
yarn
netlify link

Select Enter the site name and enter gbfs-validator

yarn run dev

Command line

The GBFS validator can be used as a Command Line Interface (CLI):

git clone https://github.com/MobilityData/gbfs-validator.git
cd gbfs-validator
node ./gbfs-validator/cli.js -u {http_address_of_gbfs_dataset} -s {local_path_to_output_report_file}
node ./gbfs-validator/cli.js --help
Usage: cli [OPTIONS]...

Options:
  -v, --version                    output the version number
  -u, --url <feed_url>             URL of the GBFS feed
  -vb, --verbose                   Verbose mode prints debugging console logs
  -s, --save-report <report_path>  Local path to output report file
  -pr, --print-report <yes_no>     Print report to standard output (choices: "yes", "no", default: "yes")
  -h, --help                       display help for command

Npm package

The gbfs-validator Node.js npm package is now accessible for integration into your projects. To learn how to install and utilize it effectively, please refer to the README for comprehensive guidance.

Projects based on this validator

transport.data.gouv.fr GBFS validator tool - Tool displaying interactive geofencing, station, and vehicle maps, the validation results, and metadata of GBFS feeds.

Contributors

<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --> <!-- prettier-ignore-start --> <!-- markdownlint-disable --> <!-- markdownlint-restore --> <!-- prettier-ignore-end --> <!-- ALL-CONTRIBUTORS-LIST:END -->

This project follows the all-contributors specification, find the emoji key here. Contributions of any kind welcome! Please check out our Contribution guidelines for details.

:warning: for contributions on schemas, please see Versions README

OpenAPI Specification

:warning: Subject to change: This OpenAPI specification may change at any time. We do not recommend building any production systems that depend on this API directly.

The OpenAPI specification can be viewed at: https://mobilitydata.github.io/gbfs-validator/SwaggerUI/index.html.

Acknowledgments

This project was originally created by Pierrick Paul (@PierrickP) at fluctuo - MobilityData started maintaining the project in September 2021.