MobilityData/gbfs

Required strings

tdelmas opened this issue Β· 7 comments

What is the issue and why is it an issue?

REQUIRED Strings : should the specification says they MUST NOT be empty ("") ?

Please describe some potential solutions you have considered (even if they aren’t related to GBFS).

The specification could say either:

  • REQUIRED Strings MUST NOT be empty
  • Empty Strings are considered as not present

Is your potential solution a breaking change?

  • Yes
  • No
  • Unsure

See also https://mobilitydata-io.slack.com/archives/CNXA9ASBV/p1708429919754579

Examples for feeds currently using (very few) empty station names:

This discussion has been automatically marked as stale because it has not had recent activity. It will be closed in 30 days if no further activity occurs. Thank you for your contributions.

#600 (comment)

Those examples are for virtual stations, so maybe they should be parking areas (geofencing zones)?

Before opening a PR, I would like the opinion of the community:

  • Should the specification forbid empty string for REQUIRED string fields ?
  • Should the specification allow empty string for OPTIONAL string fields ?

Please give your feedback with πŸ‘ πŸ‘Ž πŸ‘€ :

  • πŸ‘ Completely FORBID empty strings
  • πŸ‘€ Only FORBID empty string for REQUIRED strings
  • πŸ‘Ž ALLOW empty string even for REQUIRED strings (current situation)

My view: if a REQUIRED field should accept empty strings, maybe it shouldn't be REQUIRED.

I agree with you I would argue that an empty string is never something you should put in a GBFS feed. It's either required or optional but empty is string kind of both, which seems like a modelling error.

This discussion has been automatically marked as stale because it has not had recent activity. It will be closed in 30 days if no further activity occurs. Thank you for your contributions.

This discussion has been closed due to inactivity. Discussions can always be reopened after they have been closed.