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

Validate for both lowercase and uppercase enums? #88

Closed
josee-sabourin opened this issue Jan 13, 2023 · 4 comments
Closed

Validate for both lowercase and uppercase enums? #88

josee-sabourin opened this issue Jan 13, 2023 · 4 comments

Comments

@josee-sabourin
Copy link
Contributor

The spec states that Enum values SHOULD be lowercase.. As a reminder the spec uses RFC 2119 for requirement level language.

The validator is flagging errors in datasets that use uppercase enum values. Example here.

Because the lowercase is recommended and not required (and effectively a best practice), should the validator consider feeds using uppercase as valid? This opens the question on whether the validator should validate for best practices, or just the specification.

@testower
Copy link
Collaborator

Wow, I actually didn't realize the spec said SHOULD on this matter. This makes it quite inconvenient for deserializing. Any chance we could propose to change this to MUST for 3.0?

@josee-sabourin
Copy link
Contributor Author

josee-sabourin commented Jan 16, 2023

Absolutely - I will open the PR right now and tag you in it.

@josee-sabourin
Copy link
Contributor Author

josee-sabourin commented Feb 28, 2023

For anyone who is not following over on the GBFS repository - the PR addressing this change is open for a vote.

@josee-sabourin
Copy link
Contributor Author

Closing this as the PR on the specification has passed!

tdelmas added a commit to tdelmas/gbfs-validator that referenced this issue Jun 28, 2023
…058d

22b058d fix: incorrect spec for "languages" property in system_information.json (MobilityData#90)
e9d891b Refer to later versions in gbfs_versions.json (MobilityData#87)
fbd3ced Add v3.0 to v3.0-RC schemas (MobilityData#88)

git-subtree-dir: gbfs-validator/versions/schemas
git-subtree-split: 22b058dc4a358baf451e006cde74775075929b3d
tdelmas added a commit to tdelmas/gbfs-validator that referenced this issue Jun 28, 2023
…058d

22b058d fix: incorrect spec for "languages" property in system_information.json (MobilityData#90)
e9d891b Refer to later versions in gbfs_versions.json (MobilityData#87)
fbd3ced Add v3.0 to v3.0-RC schemas (MobilityData#88)
ef0d9a6 Fix schemas for v3.0-RC (MobilityData#85)
2b6ad1e FIX: replaces name field with localized string (MobilityData#82)
abe71f2 Fix invalid json, no trailing commas (MobilityData#83)
f43170e V3.0-RC Schemas  (MobilityData#79)
680df70 Update pr-to-project.yml
c2c30a2 Typo fix in geofencing_zones.json (MobilityData#78)
c9be765 Create pr-to-project.yml
0a17875 Create issues-to-project.yml
30e5a3a Update README.md

git-subtree-dir: gbfs-validator/versions/schemas
git-subtree-split: 22b058dc4a358baf451e006cde74775075929b3d
richfab pushed a commit that referenced this issue Jun 29, 2023
* Git ignore for schemas subtree

Signed-off-by: Tom <1955774+tdelmas@users.noreply.github.com>

* Squashed 'gbfs-validator/versions/schemas/' changes from 5273f96..22b058d

22b058d fix: incorrect spec for "languages" property in system_information.json (#90)
e9d891b Refer to later versions in gbfs_versions.json (#87)
fbd3ced Add v3.0 to v3.0-RC schemas (#88)
ef0d9a6 Fix schemas for v3.0-RC (#85)
2b6ad1e FIX: replaces name field with localized string (#82)
abe71f2 Fix invalid json, no trailing commas (#83)
f43170e V3.0-RC Schemas  (#79)
680df70 Update pr-to-project.yml
c2c30a2 Typo fix in geofencing_zones.json (#78)
c9be765 Create pr-to-project.yml
0a17875 Create issues-to-project.yml
30e5a3a Update README.md

git-subtree-dir: gbfs-validator/versions/schemas
git-subtree-split: 22b058dc4a358baf451e006cde74775075929b3d

* remove dot files in schemas

Signed-off-by: Tom <1955774+tdelmas@users.noreply.github.com>

* v3-RC validation

Signed-off-by: Tom <1955774+tdelmas@users.noreply.github.com>

* Remove unused file

Signed-off-by: Tom <1955774+tdelmas@users.noreply.github.com>

* Add `serverOpts` required in Windows

Signed-off-by: Tom <1955774+tdelmas@users.noreply.github.com>

* Fix typo `recommended`

Signed-off-by: Tom <1955774+tdelmas@users.noreply.github.com>

* update test for 3.0-RC , 3.0 and upcoming minor versions

Signed-off-by: Tom <1955774+tdelmas@users.noreply.github.com>

* fix after rebase

Signed-off-by: Tom <1955774+tdelmas@users.noreply.github.com>

* Recommended.

Signed-off-by: Tom <1955774+tdelmas@users.noreply.github.com>

* Squashed 'gbfs-validator/versions/schemas/' changes from 22b058d..5f12243

5f12243 Patch manifest.json (#91)

git-subtree-dir: gbfs-validator/versions/schemas
git-subtree-split: 5f12243d5735a608eef697212a627b9090eea31a

---------

Signed-off-by: Tom <1955774+tdelmas@users.noreply.github.com>
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

2 participants