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

error in system_alerts example #377

Closed
albertoabellagarcia opened this issue Oct 1, 2021 · 4 comments
Closed

error in system_alerts example #377

albertoabellagarcia opened this issue Oct 1, 2021 · 4 comments

Comments

@albertoabellagarcia
Copy link

The example of payload for the system_alerts data model does not validate against its schema, start and end should be literal numbers and not strings as provided.
Additionally in other examples of data models (sorry I did not take notes of which ones) failed validations against their schemas because the version attribute has not the enumeration value "3.0"

@heidiguenin
Copy link
Contributor

We moved this issue to the gbfs validator repo, so I'm closing it here.

@isabelle-dr
Copy link
Contributor

Hi @albertoabellagarcia, thanks for opening this issue!
I'm looking into and I can't find an error in the JSON schemas related to this.

  • the start and end in system_alerts are modelled this way:
  "start": {
      "description": "Start time of the alert.",
      "type": "number",
      "minimum": 1450155600
    },
    "end": {
      "description": "End time of the alert.",
      "type": "number",
      "minimum": 1450155600
    }

This is how the timestamp types are modelled in the JSON Schemas

  • The version attribute of all gbfs_versions.json files have the value 3.0.

Could you explain those errors a little more? Is it an error in the validator itself?
Thanks

@albertoabellagarcia
Copy link
Author

If you take the schema for system_alerts and the payload in the examples is wrong because the figures are quoted (therefore it is a string) while they should be unquoted to be a number. (for times subproperty of data->alerts)

@isabelle-dr
Copy link
Contributor

Oh okay I see :)
This has been fixed since the v2.2 release, see the master branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants