Skip to content

Commit e39d10d

Browse files
authored
Merge pull request #77 from entur/gbfs-3.0-release
Gbfs 3.0 release
2 parents f99d328 + afcaa5c commit e39d10d

29 files changed

+37
-906
lines changed

pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
<groupId>org.entur.gbfs</groupId>
66
<artifactId>gbfs-validator-java</artifactId>
7-
<version>1.0.27-SNAPSHOT</version>
7+
<version>1.1.0-SNAPSHOT</version>
88

99
<name>gbfs-validator-java</name>
1010
<description>Validate GBFS feeds</description>
@@ -46,8 +46,8 @@
4646
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
4747
<jdk.version>17</jdk.version>
4848

49-
<gbfsGithubUrl>https://github.com/entur/gbfs-json-schema/archive/refs/tags/v3.0-RC8.zip</gbfsGithubUrl>
50-
<schemaVersion>3.0-RC8</schemaVersion>
49+
<gbfsGithubUrl>https://github.com/entur/gbfs-json-schema/archive/refs/tags/v3.0.zip</gbfsGithubUrl>
50+
<schemaVersion>3.0</schemaVersion>
5151

5252
<everit-json-schema.version>1.14.4</everit-json-schema.version>
5353
<slf4j.version>1.7.36</slf4j.version>

src/main/java/org/entur/gbfs/validation/validator/versions/Version30_RC.java renamed to src/main/java/org/entur/gbfs/validation/validator/versions/Version30.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@
3030
import java.util.List;
3131
import java.util.Map;
3232

33-
public class Version30_RC extends AbstractVersion {
34-
public static final String VERSION = "3.0-RC";
33+
public class Version30 extends AbstractVersion {
34+
public static final String VERSION = "3.0";
3535

3636
private static final List<String> feeds = Arrays.asList(
3737
"gbfs",
@@ -65,7 +65,7 @@ public class Version30_RC extends AbstractVersion {
6565
)
6666
);
6767

68-
protected Version30_RC() {
68+
protected Version30() {
6969
super(VERSION, feeds, customRules);
7070
}
7171

src/main/java/org/entur/gbfs/validation/validator/versions/Version30_RC2.java

Lines changed: 0 additions & 76 deletions
This file was deleted.

src/main/java/org/entur/gbfs/validation/validator/versions/VersionFactory.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,8 @@ public static Version createVersion(String version) {
3535
return new Version22();
3636
case "2.3":
3737
return new Version23();
38-
case "3.0-RC":
39-
return new Version30_RC();
4038
case "3.0":
41-
case "3.0-RC2":
42-
return new Version30_RC2();
39+
return new Version30();
4340
default:
4441
throw new UnsupportedOperationException("Version not implemented");
4542
}

src/test/java/org/entur/gbfs/validation/validator/GbfsJsonValidatorTest.java

Lines changed: 15 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -167,54 +167,28 @@ void testSuccessfulV2_3Validation() {
167167
}
168168

169169
@Test
170-
void testSuccessfulV3_0_RCValidation() {
170+
void testSuccessfulV3_0Validation() {
171171
GbfsJsonValidator validator = new GbfsJsonValidator();
172172

173173
Map<String, InputStream> deliveryMap = new HashMap<>();
174-
deliveryMap.put("gbfs", getFixture("fixtures/v3.0-RC/gbfs.json"));
175-
deliveryMap.put("gbfs_versions", getFixture("fixtures/v3.0-RC/gbfs_versions.json"));
176-
deliveryMap.put("system_information", getFixture("fixtures/v3.0-RC/system_information.json"));
177-
deliveryMap.put("vehicle_types", getFixture("fixtures/v3.0-RC/vehicle_types.json"));
178-
deliveryMap.put("station_information", getFixture("fixtures/v3.0-RC/station_information.json"));
179-
deliveryMap.put("station_status", getFixture("fixtures/v3.0-RC/station_status.json"));
180-
deliveryMap.put("vehicle_status", getFixture("fixtures/v3.0-RC/vehicle_status.json"));
181-
deliveryMap.put("manifest", getFixture("fixtures/v3.0-RC/manifest.json"));
182-
deliveryMap.put("system_regions", getFixture("fixtures/v3.0-RC/system_regions.json"));
183-
deliveryMap.put("system_pricing_plans", getFixture("fixtures/v3.0-RC/system_pricing_plans.json"));
184-
deliveryMap.put("system_alerts", getFixture("fixtures/v3.0-RC/system_alerts.json"));
185-
deliveryMap.put("geofencing_zones", getFixture("fixtures/v3.0-RC/geofencing_zones.json"));
174+
deliveryMap.put("gbfs", getFixture("fixtures/v3.0/gbfs.json"));
175+
deliveryMap.put("gbfs_versions", getFixture("fixtures/v3.0/gbfs_versions.json"));
176+
deliveryMap.put("system_information", getFixture("fixtures/v3.0/system_information.json"));
177+
deliveryMap.put("vehicle_types", getFixture("fixtures/v3.0/vehicle_types.json"));
178+
deliveryMap.put("station_information", getFixture("fixtures/v3.0/station_information.json"));
179+
deliveryMap.put("station_status", getFixture("fixtures/v3.0/station_status.json"));
180+
deliveryMap.put("vehicle_status", getFixture("fixtures/v3.0/vehicle_status.json"));
181+
deliveryMap.put("manifest", getFixture("fixtures/v3.0/manifest.json"));
182+
deliveryMap.put("system_regions", getFixture("fixtures/v3.0/system_regions.json"));
183+
deliveryMap.put("system_pricing_plans", getFixture("fixtures/v3.0/system_pricing_plans.json"));
184+
deliveryMap.put("system_alerts", getFixture("fixtures/v3.0/system_alerts.json"));
185+
deliveryMap.put("geofencing_zones", getFixture("fixtures/v3.0/geofencing_zones.json"));
186186

187187
ValidationResult result = validator.validate(deliveryMap);
188188

189-
printErrors("3.0-RC", result);
189+
printErrors("3.0", result);
190190

191-
Assertions.assertEquals("3.0-RC", result.getSummary().getVersion());
192-
Assertions.assertEquals(0, result.getSummary().getErrorsCount());
193-
}
194-
195-
@Test
196-
void testSuccessfulV3_0_RC2Validation() {
197-
GbfsJsonValidator validator = new GbfsJsonValidator();
198-
199-
Map<String, InputStream> deliveryMap = new HashMap<>();
200-
deliveryMap.put("gbfs", getFixture("fixtures/v3.0-RC2/gbfs.json"));
201-
deliveryMap.put("gbfs_versions", getFixture("fixtures/v3.0-RC2/gbfs_versions.json"));
202-
deliveryMap.put("system_information", getFixture("fixtures/v3.0-RC2/system_information.json"));
203-
deliveryMap.put("vehicle_types", getFixture("fixtures/v3.0-RC2/vehicle_types.json"));
204-
deliveryMap.put("station_information", getFixture("fixtures/v3.0-RC2/station_information.json"));
205-
deliveryMap.put("station_status", getFixture("fixtures/v3.0-RC2/station_status.json"));
206-
deliveryMap.put("vehicle_status", getFixture("fixtures/v3.0-RC2/vehicle_status.json"));
207-
deliveryMap.put("manifest", getFixture("fixtures/v3.0-RC2/manifest.json"));
208-
deliveryMap.put("system_regions", getFixture("fixtures/v3.0-RC2/system_regions.json"));
209-
deliveryMap.put("system_pricing_plans", getFixture("fixtures/v3.0-RC2/system_pricing_plans.json"));
210-
deliveryMap.put("system_alerts", getFixture("fixtures/v3.0-RC2/system_alerts.json"));
211-
deliveryMap.put("geofencing_zones", getFixture("fixtures/v3.0-RC2/geofencing_zones.json"));
212-
213-
ValidationResult result = validator.validate(deliveryMap);
214-
215-
printErrors("3.0-RC2", result);
216-
217-
Assertions.assertEquals("3.0-RC2", result.getSummary().getVersion());
191+
Assertions.assertEquals("3.0", result.getSummary().getVersion());
218192
Assertions.assertEquals(0, result.getSummary().getErrorsCount());
219193
}
220194

src/test/resources/fixtures/v3.0-RC/gbfs.json

Lines changed: 0 additions & 17 deletions
This file was deleted.

src/test/resources/fixtures/v3.0-RC/gbfs_versions.json

Lines changed: 0 additions & 17 deletions
This file was deleted.

src/test/resources/fixtures/v3.0-RC/geofencing_zones.json

Lines changed: 0 additions & 98 deletions
This file was deleted.

src/test/resources/fixtures/v3.0-RC/manifest.json

Lines changed: 0 additions & 35 deletions
This file was deleted.

0 commit comments

Comments
 (0)