Skip to content

Commit 45471a4

Browse files
committed
Update schema documentation based on review
1 parent a08fa29 commit 45471a4

4 files changed

Lines changed: 18 additions & 15 deletions

File tree

application/src/main/java/org/opentripplanner/apis/transmodel/model/EnumTypes.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -466,17 +466,19 @@ public class EnumTypes {
466466

467467
public static final GraphQLEnumType VIA_LOCATION_TYPE = GraphQLEnumType.newEnum()
468468
.name("ViaLocationType")
469+
.description("Categorization for via locations.")
469470
.value(
470471
"passThrough",
471472
ViaLocationType.PASS_THROUGH,
472-
"Stop location must be " +
473-
"visited on-board a transit vehicle or the journey must alight or board at the location."
473+
"The via stop location must be visited as part of a transit trip as at the " +
474+
"boarding stop, the intermediate stop, or the alighting stop."
474475
)
475476
.value(
476477
"visit",
477478
ViaLocationType.VISIT,
478-
"Location is a stop location where the " +
479-
"passenger boards a vehicle or alights from a vehicle, or a coordinate which is visited."
479+
"The location is visited physically by boarding or alighting a transit trip at " +
480+
"a given stop, or by traveling to a requested coordinate location. Intermediate stops " +
481+
"visited on-board do not count."
480482
)
481483
.build();
482484

application/src/main/java/org/opentripplanner/apis/transmodel/model/plan/PlanPlaceType.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,8 @@ public static GraphQLObjectType create(
136136
.name("viaLocationType")
137137
.type(EnumTypes.VIA_LOCATION_TYPE)
138138
.description(
139-
"If this place was used as a via location in the request, this defines " +
140-
"what type of a via location this place is."
139+
"This defines if the place is a requested via location, and what kind it is. If the " +
140+
"value is `null`, this place is not a via location."
141141
)
142142
.dataFetcher(environment -> ((Place) environment.getSource()).viaLocationType)
143143
.build()

application/src/main/resources/org/opentripplanner/apis/gtfs/schema.graphqls

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1105,8 +1105,8 @@ type Place {
11051105
"""
11061106
vertexType: VertexType @deprecated(reason : "Unmaintained. Use `stop`, `rentalVehicle`, `vehicleParking` or `vehicleRentalStation` to tell which type it is.") @timingData
11071107
"""
1108-
If this place was used as a via location in the request, this defines what type of a via location
1109-
this place is.
1108+
This defines if the place is a requested via location, and what kind it is. If the value is
1109+
`null`, this place is not a via location.
11101110
"""
11111111
viaLocationType: ViaLocationType
11121112
}
@@ -3930,13 +3930,13 @@ enum VertexType {
39303930
"Categorization for via locations."
39313931
enum ViaLocationType {
39323932
"""
3933-
Stop location must be visited on-board a transit vehicle or the journey must alight or board at
3934-
the location.
3933+
The via stop location must be visited as part of a transit trip as at the boarding stop, the
3934+
intermediate stop, or the alighting stop.
39353935
"""
39363936
PASS_THROUGH
39373937
"""
3938-
Location is a stop location where the passenger boards a vehicle or alights from a vehicle,
3939-
or a coordinate which is visited.
3938+
The location is visited physically by boarding or alighting a transit trip at a given stop, or by
3939+
traveling to a requested coordinate location. Intermediate stops visited on-board do not count.
39403940
"""
39413941
VISIT
39423942
}

application/src/main/resources/org/opentripplanner/apis/transmodel/schema.graphql

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -527,7 +527,7 @@ type Place {
527527
rentalVehicle: RentalVehicle
528528
"Type of vertex. (Normal, Bike sharing station, Bike P+R, Transit quay) Mostly used for better localization of bike sharing and P+R station names"
529529
vertexType: VertexType
530-
"If this place was used as a via location in the request, this defines what type of a via location this place is."
530+
"This defines if the place is a requested via location, and what kind it is. If the value is `null`, this place is not a via location."
531531
viaLocationType: ViaLocationType
532532
}
533533

@@ -2081,10 +2081,11 @@ enum VertexType {
20812081
transit
20822082
}
20832083

2084+
"Categorization for via locations."
20842085
enum ViaLocationType {
2085-
"Stop location must be visited on-board a transit vehicle or the journey must alight or board at the location."
2086+
"The via stop location must be visited as part of a transit trip as at the boarding stop, the intermediate stop, or the alighting stop."
20862087
passThrough
2087-
"Location is a stop location where the passenger boards a vehicle or alights from a vehicle, or a coordinate which is visited."
2088+
"The location is visited physically by boarding or alighting a transit trip at a given stop, or by traveling to a requested coordinate location. Intermediate stops visited on-board do not count."
20882089
visit
20892090
}
20902091

0 commit comments

Comments
 (0)