diff --git a/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/EntranceImpl.java b/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/EntranceImpl.java index 9891d107479..f9faa9cc4d1 100644 --- a/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/EntranceImpl.java +++ b/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/EntranceImpl.java @@ -9,7 +9,7 @@ public class EntranceImpl implements GraphQLDataFetchers.GraphQLEntrance { @Override - public DataFetcher code() { + public DataFetcher publicCode() { return environment -> { Entrance entrance = environment.getSource(); return entrance.getCode(); diff --git a/application/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLDataFetchers.java b/application/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLDataFetchers.java index d9c9ceb67e8..26ace8fc66a 100644 --- a/application/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLDataFetchers.java +++ b/application/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLDataFetchers.java @@ -394,12 +394,12 @@ public interface GraphQLEmissions { /** Station entrance or exit, originating from OSM or GTFS data. */ public interface GraphQLEntrance { - public DataFetcher code(); - public DataFetcher entranceId(); public DataFetcher name(); + public DataFetcher publicCode(); + public DataFetcher wheelchairAccessible(); } diff --git a/application/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLTypes.java b/application/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLTypes.java index a969b5223b1..fc20625e18e 100644 --- a/application/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLTypes.java +++ b/application/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLTypes.java @@ -4327,7 +4327,11 @@ public enum GraphQLRealtimeState { UPDATED, } - /** Actions to take relative to the current position when engaging a walking/driving step. */ + /** + * A direction that is not absolute but rather fuzzy and context-dependent. + * It provides the passenger with information what they should do in this step depending on where they + * were in the previous one. + */ public enum GraphQLRelativeDirection { CIRCLE_CLOCKWISE, CIRCLE_COUNTERCLOCKWISE, diff --git a/application/src/main/resources/org/opentripplanner/apis/gtfs/schema.graphqls b/application/src/main/resources/org/opentripplanner/apis/gtfs/schema.graphqls index c9d0f3d73af..ce808e546d1 100644 --- a/application/src/main/resources/org/opentripplanner/apis/gtfs/schema.graphqls +++ b/application/src/main/resources/org/opentripplanner/apis/gtfs/schema.graphqls @@ -493,12 +493,12 @@ type Emissions { "Station entrance or exit, originating from OSM or GTFS data." type Entrance { - "Short text or a number that identifies the entrance or exit for passengers. For example, `A` or `B`." - code: String "ID of the entrance in the format of `FeedId:EntranceId`. If the `FeedId` is `osm`, the entrance originates from OSM data." entranceId: String! "Name of the entrance or exit." name: String + "Short text or a number that identifies the entrance or exit for passengers. For example, `A` or `B`." + publicCode: String "Whether the entrance or exit is accessible by wheelchair" wheelchairAccessible: WheelchairBoarding } @@ -3557,14 +3557,14 @@ enum RelativeDirection { """ Entering a public transport station. If it's not known if the passenger is entering or exiting then `CONTINUE` is used. - + More information about the entrance is in the `step.feature` field. """ ENTER_STATION """ Exiting a public transport station. If it's not known if the passenger is entering or exiting then `CONTINUE` is used. - + More information about the entrance is in the `step.feature` field. """ EXIT_STATION diff --git a/application/src/test/java/org/opentripplanner/apis/gtfs/GraphQLIntegrationTest.java b/application/src/test/java/org/opentripplanner/apis/gtfs/GraphQLIntegrationTest.java index bfd2e1cc224..2f190502ccc 100644 --- a/application/src/test/java/org/opentripplanner/apis/gtfs/GraphQLIntegrationTest.java +++ b/application/src/test/java/org/opentripplanner/apis/gtfs/GraphQLIntegrationTest.java @@ -66,7 +66,6 @@ import org.opentripplanner.routing.alertpatch.TimePeriod; import org.opentripplanner.routing.alertpatch.TransitAlert; import org.opentripplanner.routing.api.request.RouteRequest; -import org.opentripplanner.routing.graph.Graph; import org.opentripplanner.routing.graphfinder.GraphFinder; import org.opentripplanner.routing.graphfinder.NearbyStop; import org.opentripplanner.routing.graphfinder.PlaceAtDistance; @@ -139,8 +138,6 @@ class GraphQLIntegrationTest { .withSystem("Network-1", "https://foo.bar") .build(); - static final Graph GRAPH = new Graph(); - static final Instant ALERT_START_TIME = OffsetDateTime .parse("2023-02-15T12:03:28+01:00") .toInstant(); diff --git a/application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/walk-steps.json b/application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/walk-steps.json index 0e089aac428..870a788a74d 100644 --- a/application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/walk-steps.json +++ b/application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/walk-steps.json @@ -1,48 +1,48 @@ { - "data": { - "planConnection": { - "edges": [ + "data" : { + "planConnection" : { + "edges" : [ { - "node": { - "legs": [ + "node" : { + "legs" : [ { - "steps": [ + "steps" : [ { - "streetName": "street", - "area": false, - "relativeDirection": "DEPART", - "absoluteDirection": "NORTHEAST", - "feature": null + "streetName" : "street", + "area" : false, + "relativeDirection" : "DEPART", + "absoluteDirection" : "NORTHEAST", + "feature" : null }, { - "streetName": "elevator", - "area": false, - "relativeDirection": "ELEVATOR", - "absoluteDirection": null, - "feature": null + "streetName" : "elevator", + "area" : false, + "relativeDirection" : "ELEVATOR", + "absoluteDirection" : null, + "feature" : null }, { - "streetName": "entrance", - "area": false, - "relativeDirection": "CONTINUE", - "absoluteDirection": null, - "feature": { - "__typename": "Entrance", - "code": "A", - "entranceId": "osm:123", - "wheelchairAccessible": "POSSIBLE" + "streetName" : "entrance", + "area" : false, + "relativeDirection" : "CONTINUE", + "absoluteDirection" : null, + "feature" : { + "__typename" : "Entrance", + "publicCode" : "A", + "entranceId" : "osm:123", + "wheelchairAccessible" : "POSSIBLE" } } ] }, { - "steps": [] + "steps" : [ ] }, { - "steps": [] + "steps" : [ ] }, { - "steps": [] + "steps" : [ ] } ] } @@ -50,4 +50,4 @@ ] } } -} +} \ No newline at end of file diff --git a/application/src/test/resources/org/opentripplanner/apis/gtfs/queries/walk-steps.graphql b/application/src/test/resources/org/opentripplanner/apis/gtfs/queries/walk-steps.graphql index 565e620fed3..18cb5a8d49d 100644 --- a/application/src/test/resources/org/opentripplanner/apis/gtfs/queries/walk-steps.graphql +++ b/application/src/test/resources/org/opentripplanner/apis/gtfs/queries/walk-steps.graphql @@ -23,7 +23,7 @@ feature { __typename ... on Entrance { - code + publicCode entranceId wheelchairAccessible }