Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions models/typescript/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ v2.3/*
!v2.3/index.d.ts
v3.0/*
!v3.0/index.d.ts
v3.1-RC/*
!v3.1-RC/index.d.ts
v3.1-RC2/*
!v3.1-RC2/index.d.ts
2 changes: 1 addition & 1 deletion models/typescript/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ npm install gbfs-typescript-types --save-dev
## Versions
- v2.3
- v3.0
- v3.1-RC
- v3.1-RC2

## Example Code
```typescript
Expand Down
4 changes: 2 additions & 2 deletions models/typescript/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gbfs-typescript-types",
"version": "1.0.11",
"version": "1.0.12",
"description": "Language Bindings for GBFS in Typescript.",
"keywords": [
"gbfs",
Expand Down Expand Up @@ -35,7 +35,7 @@
"index.d.ts",
"v2.3",
"v3.0",
"v3.1-RC"
"v3.1-RC2"
],
"devDependencies": {
"@types/jest": "^29.5.12",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import { createCheckers } from "ts-interface-checker";

// checker model
import GbfsVersionsTI from '../v3.1-RC/test-type-checkers/gbfs_versions-ti';
import GbfsTI from '../v3.1-RC/test-type-checkers/gbfs-ti';
import GeofencingZonesTI from '../v3.1-RC/test-type-checkers/geofencing_zones-ti';
import ManifestTI from '../v3.1-RC/test-type-checkers/manifest-ti';
import StationsInformationTI from '../v3.1-RC/test-type-checkers/station_information-ti';
import StationStatusTI from '../v3.1-RC/test-type-checkers/station_status-ti';
import SystemAlertsTI from "../v3.1-RC/test-type-checkers/system_alerts-ti";
import SystemInformationTI from '../v3.1-RC/test-type-checkers/system_information-ti';
import SystemPricingPlansTI from '../v3.1-RC/test-type-checkers/system_pricing_plans-ti'
import SystemRegionsTI from "../v3.1-RC/test-type-checkers/system_regions-ti";
import VehicleStatusTI from "../v3.1-RC/test-type-checkers/vehicle_status-ti";
import VehicleTypesTI from '../v3.1-RC/test-type-checkers/vehicle_types-ti';
import GbfsVersionsTI from '../v3.1-RC2/test-type-checkers/gbfs_versions-ti';
import GbfsTI from '../v3.1-RC2/test-type-checkers/gbfs-ti';
import GeofencingZonesTI from '../v3.1-RC2/test-type-checkers/geofencing_zones-ti';
import ManifestTI from '../v3.1-RC2/test-type-checkers/manifest-ti';
import StationsInformationTI from '../v3.1-RC2/test-type-checkers/station_information-ti';
import StationStatusTI from '../v3.1-RC2/test-type-checkers/station_status-ti';
import SystemAlertsTI from "../v3.1-RC2/test-type-checkers/system_alerts-ti";
import SystemInformationTI from '../v3.1-RC2/test-type-checkers/system_information-ti';
import SystemPricingPlansTI from '../v3.1-RC2/test-type-checkers/system_pricing_plans-ti'
import SystemRegionsTI from "../v3.1-RC2/test-type-checkers/system_regions-ti";
import VehicleStatusTI from "../v3.1-RC2/test-type-checkers/vehicle_status-ti";
import VehicleTypesTI from '../v3.1-RC2/test-type-checkers/vehicle_types-ti';

// checkers
const { GbfsVersions } = createCheckers(GbfsVersionsTI);
Expand All @@ -28,23 +28,23 @@ const { SystemRegions } = createCheckers(SystemRegionsTI);
const { VehicleStatus } = createCheckers(VehicleStatusTI);
const { VehicleTypes } = createCheckers(VehicleTypesTI);

// json test data: these are gbfs with no errors for v3.1-RC
import gbfsVersionsJson from '../../../testFixtures/v3.1-RC/gbfs_versions.json';
import gbfsJson from '../../../testFixtures/v3.1-RC/gbfs.json';
import geofencingZonesJson from '../../../testFixtures/v3.1-RC/geofencing_zones.json';
import manifestJson from '../../../testFixtures/v3.1-RC/manifest.json';
import stationInformationJson from '../../../testFixtures/v3.1-RC/station_information.json';
import stationStatusJson from '../../../testFixtures/v3.1-RC/station_status.json';
import systemAlertsJson from '../../../testFixtures/v3.1-RC/system_alerts.json';
import systemInformationJson from '../../../testFixtures/v3.1-RC/system_information.json';
import systemPricingPlansJson from '../../../testFixtures/v3.1-RC/system_pricing_plans.json';
import systemRegionsJson from '../../../testFixtures/v3.1-RC/system_regions.json';
import vehicleStatusJson from '../../../testFixtures/v3.1-RC/vehicle_status.json';
import vehicleTypesJson from '../../../testFixtures/v3.1-RC/vehicle_types.json';
// json test data: these are gbfs with no errors for v3.1-RC2
import gbfsVersionsJson from '../../../testFixtures/v3.1-RC2/gbfs_versions.json';
import gbfsJson from '../../../testFixtures/v3.1-RC2/gbfs.json';
import geofencingZonesJson from '../../../testFixtures/v3.1-RC2/geofencing_zones.json';
import manifestJson from '../../../testFixtures/v3.1-RC2/manifest.json';
import stationInformationJson from '../../../testFixtures/v3.1-RC2/station_information.json';
import stationStatusJson from '../../../testFixtures/v3.1-RC2/station_status.json';
import systemAlertsJson from '../../../testFixtures/v3.1-RC2/system_alerts.json';
import systemInformationJson from '../../../testFixtures/v3.1-RC2/system_information.json';
import systemPricingPlansJson from '../../../testFixtures/v3.1-RC2/system_pricing_plans.json';
import systemRegionsJson from '../../../testFixtures/v3.1-RC2/system_regions.json';
import vehicleStatusJson from '../../../testFixtures/v3.1-RC2/vehicle_status.json';
import vehicleTypesJson from '../../../testFixtures/v3.1-RC2/vehicle_types.json';

// Date objects cannot be represented in JSON
// Manual checks for dates are required
describe('GBFS Validator v3.1-RC', () => {
describe('GBFS Validator v3.1-RC2', () => {
it('should check if gbfs_versions is valid', () => {
expect(() => {
GbfsVersions.check(gbfsVersionsJson);
Expand Down