File tree Expand file tree Collapse file tree 4 files changed +21
-6
lines changed
main/java/org/entur/gbfs/validation/validator/versions
test/resources/fixtures/v2.1 Expand file tree Collapse file tree 4 files changed +21
-6
lines changed Original file line number Diff line number Diff line change 2323import java .util .Map ;
2424import org .entur .gbfs .validation .validator .rules .CustomRuleSchemaPatcher ;
2525import org .entur .gbfs .validation .validator .rules .NoInvalidReferenceToRegionInStationInformation ;
26+ import org .entur .gbfs .validation .validator .rules .NoInvalidReferenceToStation ;
2627import org .entur .gbfs .validation .validator .rules .NoInvalidReferenceToVehicleTypesInStationStatus ;
2728import org .entur .gbfs .validation .validator .rules .NoMissingCurrentRangeMetersInVehicleStatusForMotorizedVehicles ;
2829import org .entur .gbfs .validation .validator .rules .NoMissingOrInvalidVehicleTypeIdInVehicleStatusWhenVehicleTypesExist ;
@@ -54,7 +55,8 @@ public class Version21 extends AbstractVersion {
5455 "station_status" ,
5556 List .of (
5657 new NoInvalidReferenceToVehicleTypesInStationStatus (),
57- new NoMissingVehicleTypesAvailableWhenVehicleTypesExists ()
58+ new NoMissingVehicleTypesAvailableWhenVehicleTypesExists (),
59+ new NoInvalidReferenceToStation ("station_information" )
5860 ),
5961 "free_bike_status" ,
6062 List .of (
@@ -68,7 +70,10 @@ public class Version21 extends AbstractVersion {
6870 "system_information" ,
6971 List .of (new NoMissingStoreUriInSystemInformation ("free_bike_status" )),
7072 "station_information" ,
71- List .of (new NoInvalidReferenceToRegionInStationInformation ())
73+ List .of (
74+ new NoInvalidReferenceToRegionInStationInformation (),
75+ new NoInvalidReferenceToStation ("station_status" )
76+ )
7277 );
7378
7479 protected Version21 () {
Original file line number Diff line number Diff line change 55 "data" : {
66 "stations" : [
77 {
8- "station_id" : " pga " ,
8+ "station_id" : " station1 " ,
99 "name" : " Parking garage A" ,
1010 "lat" : 12.345678 ,
1111 "lon" : 45.678901 ,
1212 "vehicle_type_capacity" : {
1313 "abc123" : 7 ,
1414 "def456" : 9
1515 }
16+ },
17+ {
18+ "station_id" : " station2" ,
19+ "name" : " SE Belmont & SE 10th" ,
20+ "lat" : 45.516445 ,
21+ "lon" : -122.655775 ,
22+ "vehicle_type_capacity" : {
23+ "abc123" : 0 ,
24+ "def456" : 0
25+ }
1626 }
1727 ]
1828 }
Original file line number Diff line number Diff line change 55 "data" :{
66 "stations" :[
77 {
8- "station_id" :" station12 " ,
8+ "station_id" :" station2 " ,
99 "station_name" :" SE Belmont & SE 10 th " ,
1010 "is_valet_station" :false ,
1111 "is_virtual_station" :true ,
Original file line number Diff line number Diff line change 55 "data" : {
66 "stations" : [
77 {
8- "station_id" : " station 1 " ,
8+ "station_id" : " station1 " ,
99 "is_installed" : true ,
1010 "is_renting" : true ,
1111 "is_returning" : true ,
2727 "count" : 0
2828 }]
2929 }, {
30- "station_id" : " station 2 " ,
30+ "station_id" : " station2 " ,
3131 "is_installed" : true ,
3232 "is_renting" : true ,
3333 "is_returning" : true ,
You can’t perform that action at this time.
0 commit comments