forked from opentripplanner/OpenTripPlanner
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add sortOrder to schema and add tests
- Loading branch information
1 parent
aa8efd2
commit 02b6804
Showing
8 changed files
with
201 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,7 +41,6 @@ GraphQL query in the left hand panel of the page: | |
name | ||
} | ||
mode | ||
bikesAllowed | ||
} | ||
} | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
160 changes: 160 additions & 0 deletions
160
src/test/resources/org/opentripplanner/apis/gtfs/expectations/routes-extended.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,160 @@ | ||
{ | ||
"data" : { | ||
"routes" : [ | ||
{ | ||
"longName" : "Long name for CARPOOL", | ||
"shortName" : "RCARPOOL", | ||
"gtfsId" : "F:CARPOOL", | ||
"agency" : { | ||
"gtfsId" : "F:A1", | ||
"name" : "Agency Test" | ||
}, | ||
"mode" : "CARPOOL", | ||
"sortOrder" : 12 | ||
}, | ||
{ | ||
"longName" : "Long name for SUBWAY", | ||
"shortName" : "RSUBWAY", | ||
"gtfsId" : "F:SUBWAY", | ||
"agency" : { | ||
"gtfsId" : "F:A1", | ||
"name" : "Agency Test" | ||
}, | ||
"mode" : "SUBWAY", | ||
"sortOrder" : 2 | ||
}, | ||
{ | ||
"longName" : "Long name for BUS", | ||
"shortName" : "RBUS", | ||
"gtfsId" : "F:BUS", | ||
"agency" : { | ||
"gtfsId" : "F:A1", | ||
"name" : "Agency Test" | ||
}, | ||
"mode" : "BUS", | ||
"sortOrder" : 3 | ||
}, | ||
{ | ||
"longName" : "Long name for FERRY", | ||
"shortName" : "RFERRY", | ||
"gtfsId" : "F:FERRY", | ||
"agency" : { | ||
"gtfsId" : "F:A1", | ||
"name" : "Agency Test" | ||
}, | ||
"mode" : "FERRY", | ||
"sortOrder" : 5 | ||
}, | ||
{ | ||
"longName" : "Long name for COACH", | ||
"shortName" : "RCOACH", | ||
"gtfsId" : "F:COACH", | ||
"agency" : { | ||
"gtfsId" : "F:A1", | ||
"name" : "Agency Test" | ||
}, | ||
"mode" : "COACH", | ||
"sortOrder" : 1 | ||
}, | ||
{ | ||
"longName" : "Long name for TRAM", | ||
"shortName" : "RTRAM", | ||
"gtfsId" : "F:TRAM", | ||
"agency" : { | ||
"gtfsId" : "F:A1", | ||
"name" : "Agency Test" | ||
}, | ||
"mode" : "TRAM", | ||
"sortOrder" : 4 | ||
}, | ||
{ | ||
"longName" : "Long name for CABLE_CAR", | ||
"shortName" : "RCABLE_CAR", | ||
"gtfsId" : "F:CABLE_CAR", | ||
"agency" : { | ||
"gtfsId" : "F:A1", | ||
"name" : "Agency Test" | ||
}, | ||
"mode" : "CABLE_CAR", | ||
"sortOrder" : 7 | ||
}, | ||
{ | ||
"longName" : "Long name for FUNICULAR", | ||
"shortName" : "RFUNICULAR", | ||
"gtfsId" : "F:FUNICULAR", | ||
"agency" : { | ||
"gtfsId" : "F:A1", | ||
"name" : "Agency Test" | ||
}, | ||
"mode" : "FUNICULAR", | ||
"sortOrder" : 9 | ||
}, | ||
{ | ||
"longName" : "Long name for RAIL", | ||
"shortName" : "RRAIL", | ||
"gtfsId" : "F:RAIL", | ||
"agency" : { | ||
"gtfsId" : "F:A1", | ||
"name" : "Agency Test" | ||
}, | ||
"mode" : "RAIL", | ||
"sortOrder" : null | ||
}, | ||
{ | ||
"longName" : "Long name for MONORAIL", | ||
"shortName" : "RMONORAIL", | ||
"gtfsId" : "F:MONORAIL", | ||
"agency" : { | ||
"gtfsId" : "F:A1", | ||
"name" : "Agency Test" | ||
}, | ||
"mode" : "MONORAIL", | ||
"sortOrder" : 11 | ||
}, | ||
{ | ||
"longName" : "Long name for GONDOLA", | ||
"shortName" : "RGONDOLA", | ||
"gtfsId" : "F:GONDOLA", | ||
"agency" : { | ||
"gtfsId" : "F:A1", | ||
"name" : "Agency Test" | ||
}, | ||
"mode" : "GONDOLA", | ||
"sortOrder" : 8 | ||
}, | ||
{ | ||
"longName" : "Long name for TROLLEYBUS", | ||
"shortName" : "RTROLLEYBUS", | ||
"gtfsId" : "F:TROLLEYBUS", | ||
"agency" : { | ||
"gtfsId" : "F:A1", | ||
"name" : "Agency Test" | ||
}, | ||
"mode" : "TROLLEYBUS", | ||
"sortOrder" : 10 | ||
}, | ||
{ | ||
"longName" : "Long name for AIRPLANE", | ||
"shortName" : "RAIRPLANE", | ||
"gtfsId" : "F:AIRPLANE", | ||
"agency" : { | ||
"gtfsId" : "F:A1", | ||
"name" : "Agency Test" | ||
}, | ||
"mode" : "AIRPLANE", | ||
"sortOrder" : 6 | ||
}, | ||
{ | ||
"longName" : "Long name for TAXI", | ||
"shortName" : "RTAXI", | ||
"gtfsId" : "F:TAXI", | ||
"agency" : { | ||
"gtfsId" : "F:A1", | ||
"name" : "Agency Test" | ||
}, | ||
"mode" : "TAXI", | ||
"sortOrder" : 13 | ||
} | ||
] | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
src/test/resources/org/opentripplanner/apis/gtfs/queries/routes-extended.graphql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
routes { | ||
longName | ||
shortName | ||
gtfsId | ||
agency { | ||
gtfsId | ||
name | ||
} | ||
mode | ||
sortOrder | ||
bikesAllowed | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,5 @@ | |
name | ||
} | ||
mode | ||
bikesAllowed | ||
} | ||
} |