MobilityData / gbfs-validator

The canonical GBFS validator. Maintained by the GBFS community, facilitated by MobilityData.
https://gbfs-validator.mobilitydata.org/
Apache License 2.0
18 stars 12 forks source link

validating gbfs version incorrect #13

Closed maxemann96 closed 4 years ago

maxemann96 commented 4 years ago

Validating https://nitro.openvelo.org/aachen/velocity/v1/gbfs.json leads to the same error in each feed:

Errors in https://nitro.openvelo.org/aachen/velocity/v1/*.json

[
  {
    "keyword": "pattern",
    "dataPath": ".version",
    "schemaPath": "#/properties/version/pattern",
    "params": {
      "pattern": "^d+\\.d+$"
    },
    "message": "should match pattern \"^d+\\.d+$\""
  }
]

but the version is reported correctly as 1.1

This error can be fixed by adjusting the regex which checks the version (in each file of https://github.com/fluctuo/gbfs-validator/tree/master/gbfs-validator/schema), current value is ^d+\\.d+$, but should be ^\\d+\\.\\d+$. Thanks for implementing the validator