tdelmas / gbfs-validator

A GBFS feed validator

Home Page:https://gbfs-validator.netlify.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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 2.3. This tool is built using the JSON Schemas, and the site is powered by Netlify.

interface

The schemas in gbfs-validator/versions/schemas is a git subtree of https://github.com/MobilityData/gbfs-json-schema. For more details, see gbfs-validator/versions/schemas/README.md.

Questions? Please open an issue or reach out to MobilityData on the GBFS slack channel!

Run the app

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

  1. Open 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 “Valid 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

  • Node.js + Yarn

  • Ports 8080, 9000 and 9229 need to be free

Node.js

We recommend you to use NVM

Minimum Node.js version v14.x.x, or higher. Recommend Node.js version v18.x.x.

Clone the repository

git clone https://github.com/fluctuo/gbfs-validator.git
cd gbfs-validator

Set Environment variables

Copy ./website/.env.exemple to ./website/.env And set values

Run dev environment

With Node.js

yarn
yarn run dev

Open localhost:8080 on your browser

Command line

The GBFS validator can be used a command line. Find below the steps for using cli feature:

  • Download or clone this repository
git clone https://github.com/fluctuo/gbfs-validator.git
cd gbfs-validator
  • Executes the cli script using one of the listed below options
./gbfs-validator/cli.js -u {http_address_of_gbfs_dataset} -s {local_path_to_output_report_file}

or

node ./gbfs-validator/cli.js -u {http_address_of_gbfs_dataset} -s {local_path_to_output_report_file}

CLI help parameter

To get the list of supported paramters

./gbfs-validator/cli.js --help

Usage description and supported parameters

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

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

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.

⚠️ for contributions on schemas, please see Versions README

Acknowledgements

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

About

A GBFS feed validator

https://gbfs-validator.netlify.com/

License:Apache License 2.0


Languages

Language:JavaScript 75.7%Language:Vue 23.6%Language:HTML 0.7%