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

Add schemas for v2.0 #33

Merged
merged 5 commits into from
Oct 27, 2020
Merged

Add schemas for v2.0 #33

merged 5 commits into from
Oct 27, 2020

Conversation

josee-sabourin
Copy link
Contributor

Set this branch compare to the v1-1 branch to be able to see the diff between the two, I hope that this doesn't get messed up when we merge v1-1.

josee-sabourin added 2 commits October 20, 2020 15:36
Adds versions + changes to system_information
@josee-sabourin josee-sabourin changed the base branch from v1-1 to master October 22, 2020 14:44
Copy link
Member

@barbeau barbeau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@josee-sabourin Looks good! A few comments in-line.

@@ -18,8 +18,7 @@
"description": "GBFS version number to which the feed conforms, according to the versioning framework (added in v1.1).",
"type": "string",
"enum": [
"1.1-RC",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should keep all previous valid versions in the enum here, so it should include 1.0, 1.1-RC, 1.1, v2.0-RC in addition to 2.0

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure I understand why the versions should be included, this schema would not be representative of a v1.0 dataset, can you explain the reasoning to me?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess it could go either way, depending on how we want to use the schema.

I would thinking primarily in context of generating software to generate, parse or validate feeds from the schema, where you would need to know what the universe of valid version numbers are at a given GBFS version. For example, there should only be breaking schema changes between major versions (e.g., changing booleans from 0/1 to true/false between v1 and v2). So you could use a v1.1 schema to validate, parse and generate a v1.0 feed as well as a v1.1 feed. And if the changes are only semantic (e.g., ID fields must be rotated for floating bikes) and the data types don't change, you could use a single schema (and generated software) to work across multiple major release versions too. So basically it would potentially be less software to maintain for people generating software from the schema.

But you could also make the argument that we want to keep a strict 1:1 mapping between the schema and it's version, so it can only be used for the same version feeds.

Maybe a question for the community and how they plan to use the schemas? In the meantime it's fine if you want to keep it showing only the latest version.

free_bike_status.json Show resolved Hide resolved
free_bike_status.json Outdated Show resolved Hide resolved
station_status.json Show resolved Hide resolved
station_status.json Show resolved Hide resolved
system_pricing_plans.json Show resolved Hide resolved
This was referenced Oct 26, 2020
@josee-sabourin josee-sabourin merged commit f882cf4 into master Oct 27, 2020
@josee-sabourin josee-sabourin deleted the v2-0 branch October 27, 2020 17:35
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

Successfully merging this pull request may close these issues.

2 participants