entur / lamassu

Mobility hub
European Union Public License 1.2
5 stars 7 forks source link

Vehicles are skipped if optional pricing_plan_id is not not set #396

Closed hbruch closed 5 months ago

hbruch commented 5 months ago

Expected behavior

Vehicles with property pricing_plan_id not explicitly set should not be skipped, as the vehicle type references by vehicle_type_id needs to declare a default_pricing_plan_id, which applies in such a case (see spec GBFSv2.3).

Observed behavior

They are skipped (VehicleFilter assumes getPricingPlanId() returns a non null value).

Version of lamassu used (exact commit hash or JAR name)

28b90d3

Data sets in use (links to GBFS feeds)

e.g. https://stables.donkey.bike/api/public/gbfs/2/donkey_yverdon-les-bains/gbfs.json

testower commented 5 months ago

Nice catch. This probably means we also need to account for that case in the vehicle mapping: https://github.com/entur/lamassu/blob/28b90d310a37d7f059bbeef5e906d3d3256046cd/src/main/java/org/entur/lamassu/leader/entityupdater/VehiclesUpdater.java#L155-L162