gbfs icon indicating copy to clipboard operation
gbfs copied to clipboard

Required strings

Open tdelmas opened this issue 1 year ago • 5 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?

  • [X] Yes
  • [ ] No
  • [ ] Unsure

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

tdelmas avatar Feb 20 '24 15:02 tdelmas

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

richfab avatar Feb 28 '24 11:02 richfab

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.

mobilitydataio avatar Apr 29 '24 04:04 mobilitydataio

https://github.com/MobilityData/gbfs/issues/600#issuecomment-1968811482

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

tdelmas avatar Apr 29 '24 08:04 tdelmas

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 :+1: :-1: :eyes: :

  • :+1: Completely FORBID empty strings
  • :eyes: Only FORBID empty string for REQUIRED strings
  • :-1: 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.

tdelmas avatar May 13 '24 10:05 tdelmas

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.

leonardehrenfried avatar May 13 '24 10:05 leonardehrenfried

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.

mobilitydataio avatar Jul 13 '24 04:07 mobilitydataio

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

mobilitydataio avatar Aug 12 '24 04:08 mobilitydataio