Closed PierrickP closed 2 years ago
This line impact the requirement of the file for the nextbike feed https://github.com/MobilityData/gbfs-validator/blob/3a3cd865a7884744f80df36a88d2f0f76c92bce1/gbfs-validator/gbfs.js#L522
hasBikesStationId
is true.
Should we require vehicle_types.json
if there are station_id
?
Thanks for creating this and for pointing to the corresponding piece of code.
Not sure if I should feel addressed by the question, but according to my understanding, the relation is the other way round:
station_id
in free_bike_status
is:
REQUIRED only if the vehicle is currently at a station and the vehicle_types.json file has been defined.
while station_id
being present does not mean the vehicle_type.json
becomes required.
--
Side note regarding https://github.com/MobilityData/gbfs-validator/blob/3a3cd865a7884744f80df36a88d2f0f76c92bce1/gbfs-validator/gbfs.js#L522
freeBikeStatusHasVehicleId
rather means freeBikeStatusHasVehicleTypeId
, right?
Yeah, I'm pretty sure the condition is not right
It's a bit complex. The file is required if some fields are defined and in the other way, if the file is defined, it required the fields.
I suspect that this change broke https://github.com/MobilityData/gbfs-validator/pull/41. For v2.2 feeds the
vehicle_types.json
is thought to be required again, even if the criteria stated in gbfs.mdis not given.
Example feed: https://gbfs-validator.netlify.app/?url=https%3A%2F%2Fgbfs.nextbike.net%2Fmaps%2Fgbfs%2Fv2%2Fnextbike_le%2Fgbfs.json which states
for the
vehicle_types.json
.Should I open a new issue?
Best regards
Originally posted by @nbdh in https://github.com/MobilityData/gbfs-validator/issues/63#issuecomment-1255072227