Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upstream merge 2023-10-09 #186

Merged
merged 134 commits into from
Oct 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
134 commits
Select commit Hold shift + click to select a range
17cd581
Clean up test resource loading
leonardehrenfried Aug 16, 2023
0c0c8d4
Consitently use File instance througout tests
leonardehrenfried Aug 16, 2023
09fc4b3
Move Germany files into the correct subfolders
leonardehrenfried Aug 16, 2023
36e483b
Clean up test URL generation
leonardehrenfried Aug 16, 2023
c9c5c56
Extract separate method for loading OSM files
leonardehrenfried Aug 16, 2023
42a9bea
Use File directly in FlexTest
leonardehrenfried Aug 16, 2023
8c90fb3
Clean up URI handling
leonardehrenfried Aug 17, 2023
b5d1a9c
Rename 'testagency' to 'simple'
leonardehrenfried Aug 17, 2023
659ea0d
Fix flex access itinerary mapping
vpaturet Aug 28, 2023
d902f4e
Apply review suggestion
vpaturet Aug 29, 2023
c049d9f
Fix filtering of rental vehicle in vehicle station BBox search
vpaturet Aug 29, 2023
eb8ec70
Apply review suggestion
vpaturet Aug 29, 2023
e68eb35
Move GTFS GraphQL API out of the sandbox
leonardehrenfried Aug 29, 2023
61b53f8
Update documentation
leonardehrenfried Aug 30, 2023
69ad153
Move schema file
leonardehrenfried Aug 30, 2023
98020be
Fix doc and code generation
leonardehrenfried Aug 31, 2023
6de1cf2
Use static imports
leonardehrenfried Aug 31, 2023
6f02515
Remove from sandbox documents
leonardehrenfried Aug 31, 2023
0ba31e5
Change path of schema file
leonardehrenfried Aug 31, 2023
b4be6c8
Reformat code
leonardehrenfried Aug 31, 2023
ae18391
Update link in documentation
leonardehrenfried Aug 31, 2023
68a267d
doc: Add checklist item for GitHub maintenance in release checklist
t2gran Sep 15, 2023
de08df9
Merge remote-tracking branch 'upstream/dev-2.x' into graphql-move
leonardehrenfried Sep 15, 2023
7b48c4d
Move resource file into org/opentripplanner/... folder structure
leonardehrenfried Sep 15, 2023
621b802
Also move test assertions into correct folder
leonardehrenfried Sep 15, 2023
89be979
Update docs test
leonardehrenfried Sep 15, 2023
aa8a6d7
Make URL a link
leonardehrenfried Sep 15, 2023
5521f3e
Apply suggestions from code review
t2gran Sep 15, 2023
76cfb12
Implement sensible barrier vertex logic
vesameskanen Sep 17, 2023
4db1d6e
Uodate bollard tests
vesameskanen Sep 17, 2023
efc72cd
Move comment to a place where the logic is
vesameskanen Sep 17, 2023
9ae2f40
Repair dead end barriers, which break routing
vesameskanen Sep 18, 2023
c70b80c
Add test for barrier vertex pruning
vesameskanen Sep 19, 2023
afc3fd7
Merge remote-tracking branch 'upstream/dev-2.x' into graphql-move
leonardehrenfried Sep 21, 2023
3dd8794
Update dependency com.google.cloud.tools:jib-maven-plugin to v3.4.0
renovate[bot] Sep 21, 2023
005b780
Move barrier vertex specific logic to the class itself
vesameskanen Sep 22, 2023
a14a883
Improve docs
vesameskanen Sep 22, 2023
29f31ab
Merge remote-tracking branch 'upstream/dev-2.x' into graphql-move
leonardehrenfried Sep 22, 2023
05ec1f3
Use bulk operation on collections
vpaturet Sep 22, 2023
431f8e0
Fix size of List.toArray() parameter
vpaturet Sep 22, 2023
754c51d
Use String.isEmpty() to test empty String
vpaturet Sep 22, 2023
820b3d7
Replace wrapper with primitive
vpaturet Sep 22, 2023
ae46416
Use short-circuit boolean operator
vpaturet Sep 22, 2023
942ba64
Merge remote-tracking branch 'upstream/dev-2.x' into clean-up-test-re…
leonardehrenfried Sep 23, 2023
062659a
Merge remote-tracking branch 'upstream/dev-2.x' into graphql-move
leonardehrenfried Sep 25, 2023
3e791e5
Merge branch 'dev-2.x' into fix_vehicle_filtering_in_bike_rental_stat…
vpaturet Sep 25, 2023
acda2b8
Apply review suggestions
vpaturet Sep 25, 2023
8049fd3
Make ResourceLoader package-dependent
leonardehrenfried Sep 25, 2023
61e2753
Apply review suggestions
vpaturet Sep 25, 2023
d492a72
Apply review suggestions
vpaturet Sep 25, 2023
68dcfcb
Use resource loader throughout
leonardehrenfried Sep 25, 2023
ad114b2
Merge remote-tracking branch 'upstream/dev-2.x' into clean-up-test-re…
leonardehrenfried Sep 25, 2023
8f35329
Merge remote-tracking branch 'upstream/dev-2.x' into clean-up-test-re…
leonardehrenfried Sep 25, 2023
6fff486
Move more files into proper folder structure
leonardehrenfried Sep 25, 2023
32bf3d0
Move flex test resources into subfolders
leonardehrenfried Sep 25, 2023
d316b22
Move more files
leonardehrenfried Sep 25, 2023
be4b482
Merge remote-tracking branch 'upstream/dev-2.x' into graphql-move
leonardehrenfried Sep 25, 2023
c6a0dac
Resolve merge artifacts
leonardehrenfried Sep 25, 2023
153a508
Use correct pacakge name
leonardehrenfried Sep 25, 2023
ec1025d
Move alert entity to the other typr resolvers
leonardehrenfried Sep 25, 2023
699214a
Correct comment
leonardehrenfried Sep 25, 2023
ee01679
Rename FakeGraph and make it package-private
leonardehrenfried Sep 25, 2023
883baff
Change bollard property to more general and useful motor vehicle barrier
vesameskanen Sep 25, 2023
b5ead24
Add comments about barrier pruning logic
vesameskanen Sep 25, 2023
5e424de
Follow code style conventions
vesameskanen Sep 25, 2023
ba78519
Merge pull request #5369 from HSLdevcom/fix-bollard
vesameskanen Sep 26, 2023
1816d1b
Add changelog entry for #5369 [ci skip]
Sep 26, 2023
138e494
Merge pull request #5371 from opentripplanner/renovate/com.google.clo…
leonardehrenfried Sep 26, 2023
3bcdf54
Update docs/ReleaseChecklist.md
t2gran Sep 26, 2023
dd85e85
Automatically upgrade jib and shade maven plugins [ci skip]
leonardehrenfried Sep 26, 2023
ca6cdad
Merge pull request #5329 from entur/fix_vehicle_filtering_in_bike_ren…
vpaturet Sep 26, 2023
7c02e07
Merge pull request #5339 from ibi-group/graphql-move
leonardehrenfried Sep 26, 2023
5535ca6
Add changelog entry for #5339 [ci skip]
Sep 26, 2023
5085fb3
Merge pull request #5373 from entur/minor_performance_fixes
vpaturet Sep 27, 2023
6ebf2dc
Merge remote-tracking branch 'upstream/dev-2.x' into clean-up-test-re…
leonardehrenfried Sep 27, 2023
d8022ae
Use new API for loading resource
leonardehrenfried Sep 27, 2023
7033e5e
Apply suggestions from code review
leonardehrenfried Sep 27, 2023
311f16f
Fix formatting
leonardehrenfried Sep 27, 2023
7e6d5ed
Rename constant and add documentation
leonardehrenfried Sep 27, 2023
0666f3b
Remove unnecessary File constructors
leonardehrenfried Sep 27, 2023
be1be39
Move information into speed test package.md
leonardehrenfried Sep 27, 2023
46a347c
Use correct CARPOOL mode range in docs
leonardehrenfried Sep 27, 2023
d9de200
Update Readme [ci skip]
leonardehrenfried Sep 28, 2023
154a98f
Update version comparison [ci skip]
leonardehrenfried Sep 28, 2023
748cf90
Fix link [ci skip]
leonardehrenfried Sep 28, 2023
5a7aa40
Fix barrier vertex test
vesameskanen Sep 28, 2023
a9e7254
Simplify barrier check by using existing super class method
vesameskanen Sep 28, 2023
d280c23
Merge pull request #5383 from HSLdevcom/barrier-test-fix
vesameskanen Sep 28, 2023
78ca61d
Remove empty file
leonardehrenfried Sep 28, 2023
60ccdb4
Merge pull request #5359 from entur/otp2_release_checklist
leonardehrenfried Sep 28, 2023
60261b0
Merge remote-tracking branch 'upstream/dev-2.x' into clean-up-test-re…
leonardehrenfried Sep 28, 2023
accc4db
Fix spelling [ci skip]
leonardehrenfried Sep 28, 2023
bcf953f
Update dependency mkdocs to v1.5.3
renovate[bot] Oct 1, 2023
a6344ac
Update lucene.version to v9.8.0
renovate[bot] Oct 1, 2023
9363ab3
Update dependency mkdocs-material to v9.4.2
renovate[bot] Oct 1, 2023
a60e6dd
Don't crash interline processing if no service data
optionsome Oct 2, 2023
3228c57
Merge pull request #5299 from leonardehrenfried/clean-up-test-resources
leonardehrenfried Oct 3, 2023
1565ec5
Fix documentation formatting.
Sep 20, 2023
06ba7ad
Provide a way to reset the global feed id back to uninitialized.
Sep 29, 2023
038d079
Introduce a transmodel graphql API for specifying pass-through points.
Jun 20, 2023
82fa760
Map from values in the RouteRequest to a Raptor PassThroughPoints ins…
Aug 21, 2023
fb35a61
Merge pull request #5320 from opentripplanner/pass-through_graphql
jtorin Oct 3, 2023
8d5490e
Add changelog entry for #5320 [ci skip]
Oct 3, 2023
dc73192
Update google.dagger.version to v2.48.1
renovate[bot] Oct 4, 2023
36d6386
Fix IBI fare calculators
leonardehrenfried Oct 4, 2023
32675a0
Log Java version info at startup
vpaturet Oct 5, 2023
7373e95
Add more tests
leonardehrenfried Oct 5, 2023
1b7880b
Add full test of OrcaFareCalculator
leonardehrenfried Oct 5, 2023
24ec65c
Remove Impl from HslFareService
leonardehrenfried Oct 5, 2023
0df8eef
Add full tests for AtlantaFare calculator
leonardehrenfried Oct 5, 2023
5a2f213
Add Javadoc
leonardehrenfried Oct 5, 2023
e56a1f8
Add more test assertions
leonardehrenfried Oct 5, 2023
ec1903c
Merge pull request #5388 from opentripplanner/renovate/lucene.version
vpaturet Oct 5, 2023
1a99f16
Merge pull request #5391 from opentripplanner/renovate/google.dagger.…
leonardehrenfried Oct 5, 2023
3b2a281
Merge pull request #5394 from entur/log_java_version_info_at_startup
vpaturet Oct 5, 2023
f9ec303
Update src/test/java/org/opentripplanner/routing/algorithm/mapping/Ra…
t2gran Oct 5, 2023
3a1518c
Merge pull request #5323 from entur/fix_flex_access_itinerary_mapping
vpaturet Oct 6, 2023
3350634
Apply review feedback
leonardehrenfried Oct 6, 2023
fd232c8
Merge remote-tracking branch 'upstream/dev-2.x' into fix-ibi-calculators
leonardehrenfried Oct 6, 2023
b0d9a18
Merge pull request #5389 from HSLdevcom/add-service-validation
optionsome Oct 6, 2023
443f084
Add fares smoke test for SEPTA
leonardehrenfried Oct 6, 2023
c11bb68
Assert that all transit legs have fares
leonardehrenfried Oct 6, 2023
1f3876a
Fix formatting
leonardehrenfried Oct 6, 2023
699f20c
Rename method
leonardehrenfried Oct 6, 2023
b8f491f
Add spin scooters in Portland
leonardehrenfried Oct 6, 2023
bbc7dd0
Remove unused serialization stuff
leonardehrenfried Oct 6, 2023
33c8c9c
Increase sleep for Portland
leonardehrenfried Oct 6, 2023
b4e4ea6
Update dependency org.mockito:mockito-core to v5.6.0
renovate[bot] Oct 8, 2023
bdfda72
Merge pull request #5397 from ibi-group/fix-ibi-calculators
leonardehrenfried Oct 9, 2023
a642678
Merge remote-tracking branch 'upstream/dev-2.x' into upstream-merge-2…
leonardehrenfried Oct 9, 2023
df1962e
Merge branch 'septa-fares' into upstream-merge-2023-10-09
leonardehrenfried Oct 9, 2023
d9c4317
Check that Seattle has fare products
leonardehrenfried Oct 9, 2023
d0318ba
Upgrade to client version 0.0.16
leonardehrenfried Oct 9, 2023
43a5eb1
Improve logging of fare products
leonardehrenfried Oct 9, 2023
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 .github/workflows/cibuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ jobs:
# schema hasn't changed.
# example commit: https://github.com/opentripplanner/docs/commit/45e6ddf8e4a4

SCHEMA_FILE_MODIFIED=`git log -n 1 --pretty=format:%ct src/ext/resources/gtfsgraphqlapi/schema.graphqls`
SCHEMA_FILE_MODIFIED=`git log -n 1 --pretty=format:%ct src/main/resources/org/opentripplanner/apis/gtfs/schema.graphqls`
echo "schema modified at ${SCHEMA_FILE_MODIFIED}"
git checkout $LOCAL_BRANCH
DOCS_MODIFIED=`git log -n 1 --pretty=format:%ct api/dev-2.x/graphql-gtfs/introduction.html`
Expand All @@ -204,7 +204,7 @@ jobs:
with:
node-version: 16
- name: Run code generator
working-directory: src/ext/java/org/opentripplanner/ext/gtfsgraphqlapi/generated
working-directory: src/main/java/org/opentripplanner/apis/gtfs/generated
run: |
yarn install
yarn generate
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/smoke-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
sleep: 15
- name: portland
# have to sleep longer since computing geofencing zones takes a while
sleep: 80
sleep: 125

steps:
- uses: actions/checkout@v3
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ GTFS and OpenStreetMap). It applies real-time updates and alerts with immediate
clients, finding itineraries that account for disruptions and service changes.

Note that this branch contains **OpenTripPlanner 2**, the second major version of OTP, which has
been under development since Q2 2018. The latest version of OTP is v2.2.0, released in November 2022.
been under development since 2018. The latest version of OTP is v2.4.0, released in September 2023.

If you do not want to test or explore this version, please switch to the final 1.x release
tag `v1.5.0` or the `dev-1.x` branch for any patches and bugfixes applied to the v1.5.0 release.
If you do not want to use this version, please switch to the final 1.x release
tag `v1.5.0` or the `dev-1.x` branch.

## Performance Test

Expand Down
12 changes: 6 additions & 6 deletions doc-templates/GraphQL-Tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
# GraphQL tutorial

This document will give you a quick start tutorial on how to get started with OTP's GraphQL APIs. For
this tutorial we will be using the [GTFS GraphQL API](sandbox/GtfsGraphQlApi.md) as this is the most commonly used one.
this tutorial we will be using the [GTFS GraphQL API](GTFS-GraphQL-API.md) as this is the most commonly used one.

First of all, make sure that you've loaded street and transit data into your instance by following
the [basic tutorial](Basic-Tutorial.md)
the [basic tutorial](../Basic-Tutorial.md)

## Visual GraphQL API client

Expand All @@ -20,7 +20,7 @@ started OTP, visit [http://localhost:8080/graphiql](http://localhost:8080/graphi

It should look like this:

![GraphiQL](images/graphiql.png)
![GraphiQL](../images/graphiql.png)

## Sending your first query

Expand All @@ -35,12 +35,12 @@ side panel.
Now would be a good time to explore the auto-complete capabilities of the tool by moving the
cursor into the query panel and hitting Ctrl-Space to see what other query parameters are possible.

![GraphiQL](images/graphiql-autocomplete.png)
![GraphiQL](../images/graphiql-autocomplete.png)

The explorer also has documentation built into it. If you hover your pointer over a property on the
left hand side you can see its documentation.

![GraphiQL](images/graphiql-documentation.png)
![GraphiQL](../images/graphiql-documentation.png)

## A more advanced query

Expand All @@ -51,4 +51,4 @@ Most people want to get routing results out of OTP, so lets see the query for th
Again, please use the autocomplete and documentation viewers to figure out what each input parameter
and property means.

More examples for a variety of queries can also be found [in the test code](https://github.com/opentripplanner/OpenTripPlanner/tree/dev-2.x/src/ext-test/resources/gtfsgraphqlapi/queries).
More examples for a variety of queries can also be found [in the test code](https://github.com/opentripplanner/OpenTripPlanner/tree/dev-2.x/src/test/resources/org/opentripplanner/apis/gtfs/queries).
2 changes: 1 addition & 1 deletion docs/Basic-Tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,4 +201,4 @@ You can run the OTP .jar file with the `--help` option for a full list of comman

## Exploring the API

If you want to learn how to use OTP's API's, check out the [GraphQL tutorial](GraphQL-Tutorial.md).
If you want to learn how to use OTP's API's, check out the [GraphQL tutorial](apis/GraphQL-Tutorial.md).
3 changes: 3 additions & 0 deletions docs/Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ based on merged pull requests. Search GitHub issues and pull requests for smalle
- Fix rental scooter access [#5361](https://github.com/opentripplanner/OpenTripPlanner/pull/5361)
- De-duplicate stops returned by `stopsByRadius` [#5366](https://github.com/opentripplanner/OpenTripPlanner/pull/5366)
- Fix value mapping for bikesAllowed in GTFS GraphQL API [#5368](https://github.com/opentripplanner/OpenTripPlanner/pull/5368)
- Apply correct traversal permissions to barrier vertex [#5369](https://github.com/opentripplanner/OpenTripPlanner/pull/5369)
- Move GTFS GraphQL API out of the sandbox [#5339](https://github.com/opentripplanner/OpenTripPlanner/pull/5339)
- Transmodel GraphQL API for pass-through searches [#5320](https://github.com/opentripplanner/OpenTripPlanner/pull/5320)
[](AUTOMATIC_CHANGELOG_PLACEHOLDER_DO_NOT_REMOVE)

## 2.4.0 (2023-09-13)
Expand Down
2 changes: 1 addition & 1 deletion docs/Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ Here is a list of all features which can be toggled on/off and their default val
| `ConsiderPatternsForDirectTransfers` | Enable limiting transfers so that there is only a single transfer to each pattern. | ✓️ | |
| `DebugClient` | Enable the debug web client located at the root of the web server. | ✓️ | |
| `FloatingBike` | Enable floating bike routing. | ✓️ | |
| `GtfsGraphQlApi` | Enable GTFS GraphQL API. | ✓️ | ✓️ |
| `GtfsGraphQlApi` | Enable GTFS GraphQL API. | ✓️ | |
| `MinimumTransferTimeIsDefinitive` | If the minimum transfer time is a lower bound (default) or the definitive time for the transfer. Set this to `true` if you want to set a transfer time lower than what OTP derives from OSM data. | | |
| `OptimizeTransfers` | OTP will inspect all itineraries found and optimize where (which stops) the transfer will happen. Waiting time, priority and guaranteed transfers are taken into account. | ✓️ | |
| `ParallelRouting` | Enable performing parts of the trip planning in parallel. | | |
Expand Down
14 changes: 14 additions & 0 deletions docs/ReleaseChecklist.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,20 @@ manually is more tedious, but keeps eyes on each step and is less prone to failu
* Mention the new version number.
* Provide links to the new developer documentation.
* Provide links to the artifacts directory on Maven Central.
* Prepare for the next release in GitHub by renaming the released milestone and creating a new
milestone for the next release. Then make sure all issues and PRs are tagged with the correct
milestone.
* Close open PRs older than 2 years, make sure the milestone is set to `Rejected`.
* Rename the old milestone from `x.y (Next Release)` to `x.y`. All issues and PRs assigned to
this milestone are automatically updated.
* Create a new milestone: `x.y+1 (Next Release)`
* All PullRequests SHOULD have a milestone (except some very old ones)
* Assign all *open* PRs to this new milestone `x.y+1 (Next Release)`.
* Assign all *closed* PRs without a milestone in the release to the released milestone
`x.y`. Make sure NOT to include very old PRs or PRs merged after the release(if any).
* Some issues have a milestone, but not all.
* Move all open issues with the released milestone `x.y` to the next release
`x.y+1 (Next Release)`.

## Artifact Signing

Expand Down
2 changes: 1 addition & 1 deletion docs/RoutingModes.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ Used for street-level cable cars where the cable runs beneath the car.

Private car trips shared with others.

This is currently not specified in GTFS so we use the mode type values 1500-1560 which are in the range of private taxis.
This is currently not specified in GTFS so we use the mode type values 1550-1560 which are in the range of private taxis.


<h4 id="COACH">COACH</h4>
Expand Down
1 change: 0 additions & 1 deletion docs/SandboxExtension.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ provided "as is".
- [Geocoder API](sandbox/GeocoderAPI.md) - Adds an API to search for corners, stops and stations.
- [Transfer analyser](sandbox/transferanalyzer.md) - Module used for analyzing the transfers between
nearby stops generated by routing via OSM data.
- [GTFS GraphQL API](sandbox/GtfsGraphQlApi.md) - HSL's GraphQL API used by the Digitransit project.
- [Transmodel API](sandbox/TransmodelApi.md) - Enturs GraphQL Transmodel API.
- [SIRI Updater](sandbox/SiriUpdater.md) - Update OTP with realtime information from a Transmodel SIRI data source.
- [SIRI Azure Updater](sandbox/SiriAzureUpdater.md) - fetch SIRI realtime data through *Azure Service Bus*
Expand Down
7 changes: 4 additions & 3 deletions docs/Version-Comparison.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ the EU profile, and generalization to the EU profile should be feasible once it
| SIRI Realtime | no | yes |
| Elevation data | TIFF and NED | TIFF and NED |
| One-to-many routing,<br> isochrones and scripting | yes | no |
| Java version | 8+ | 11+ |
| Isochrones | yes | yes |
| Java version | 8+ | 17+ |
| Multiple regions per server | yes | no |
| Hot reloading of graphs | yes | no |
| Street (OSM) routing algorithm | Generalized cost A* | Generalized cost A* |
Expand Down Expand Up @@ -125,7 +126,7 @@ OTP2 to simplify the code base and make it easier to reason about security.
Less parameters are available on the OTP2 REST API than in OTP1. Often there is no practical loss of
functionality, just a different way of expressing things due to the new routing algorithms. A
summary of parameters that have been removed and their replacements can be found in the [migration
guide](Version-Comparison.md#Migration guide)
guide](Version-Comparison.md#migration-guide)

## OTP Trip planning and Transit index APIs

Expand All @@ -136,7 +137,7 @@ GraphQL API, the only supported way of sending requests to the OTP routing engin
Details of those two APIs are available at the following pages:


- [GTFS GraphQL API](sandbox/GtfsGraphQlApi.md) - HSL's GraphQL API used by the Digitransit
- [GTFS GraphQL API](apis/GTFS-GraphQL-API.md) - HSL's GraphQL API used by the Digitransit
project.
- [Transmodel API](sandbox/TransmodelApi.md) - Entur´s Transmodel API

Expand Down
10 changes: 5 additions & 5 deletions docs/Apis.md → docs/apis/Apis.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,23 @@

Several services are built upon OTP's routing and transit data indexing engines. They expose these APIs:

The [GTFS GraphQL API](sandbox/GtfsGraphQlApi.md) has been used by the Digitransit and otp-react-redux
The [GTFS GraphQL API](GTFS-GraphQL-API.md) has been used by the Digitransit and otp-react-redux
projects as a general purpose routing and transit data API in production for many years.
If your input data is mostly GTFS then this is probably the best choice as it uses the same vocabulary.

The [Transmodel GraphQL API](sandbox/TransmodelApi.md) is used at
The [Transmodel GraphQL API](../sandbox/TransmodelApi.md) is used at
Entur in production since 2020. Like the GTFS GraphQL API it is also a general purpose API.
If your input data is mostly NeTeX then you might want to investigate
this API as it uses the [Transmodel vocabulary](https://en.wikipedia.org/wiki/Transmodel) to describe
its entities.

The [Vector tiles API](sandbox/MapboxVectorTilesApi.md) is a special purpose API for displaying
The [Vector tiles API](../sandbox/MapboxVectorTilesApi.md) is a special purpose API for displaying
entities on a vector map.

The [Actuator API](sandbox/ActuatorAPI.md) provides endpoints for checking the health status of the
The [Actuator API](../sandbox/ActuatorAPI.md) provides endpoints for checking the health status of the
OTP instance and reading live application metrics.

The [Geocoder API](sandbox/GeocoderAPI.md) allows you to geocode street corners and stop names.
The [Geocoder API](../sandbox/GeocoderAPI.md) allows you to geocode street corners and stop names.

## Legacy APIs (to be removed)

Expand Down
43 changes: 43 additions & 0 deletions docs/apis/GTFS-GraphQL-API.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# GTFS GraphQL API

The GTFS GraphQL API is a general purpose API which was created for the Digitransit project and is
used heavily by [digitransit-ui](https://github.com/HSLdevcom/digitransit-ui).

[otp-react-redux](https://github.com/opentripplanner/otp-react-redux) has also migrated to this API in 2023.

## URLs
- GraphQL endpoint: [`http://localhost:8080/otp/routers/default/index/graphql`](http://localhost:8080/otp/routers/default/index/graphql)
- HTML schema documentation: [https://docs.opentripplanner.org/api/dev-2.x/graphql-gtfs/](https://docs.opentripplanner.org/api/dev-2.x/graphql-gtfs/)
- Built-in visual GraphQL client: [http://localhost:8080/graphiql](http://localhost:8080/graphiql)

## Built-in API client

A browser based GraphQL API client is available at [http://localhost:8080/graphiql](http://localhost:8080/graphiql)

![GraphiQL](../images/graphiql.png)

**`curl` example**

A complete example that fetches the list of all stops from OTP is:

```
curl --request POST \
--url http://localhost:8080/otp/routers/default/index/graphql \
--header 'Content-Type: application/json' \
--header 'OTPTimeout: 180000' \
--data '{"query":"query stops {\n stops {\n gtfsId\n name\n }\n}\n","operationName":"stops"}'
```
## Configuration

The API is enabled by default.

If you want to disable it, do it in `otp-config.json`:

```json
// otp-config.json
{
"otpFeatures" : {
"GtfsGraphQlApi": false
}
}
```
16 changes: 8 additions & 8 deletions docs/GraphQL-Tutorial.md → docs/apis/GraphQL-Tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
# GraphQL tutorial

This document will give you a quick start tutorial on how to get started with OTP's GraphQL APIs. For
this tutorial we will be using the [GTFS GraphQL API](sandbox/GtfsGraphQlApi.md) as this is the most commonly used one.
this tutorial we will be using the [GTFS GraphQL API](GTFS-GraphQL-API.md) as this is the most commonly used one.

First of all, make sure that you've loaded street and transit data into your instance by following
the [basic tutorial](Basic-Tutorial.md)
the [basic tutorial](../Basic-Tutorial.md)

## Visual GraphQL API client

Expand All @@ -20,7 +20,7 @@ started OTP, visit [http://localhost:8080/graphiql](http://localhost:8080/graphi

It should look like this:

![GraphiQL](images/graphiql.png)
![GraphiQL](../images/graphiql.png)

## Sending your first query

Expand Down Expand Up @@ -54,12 +54,12 @@ side panel.
Now would be a good time to explore the auto-complete capabilities of the tool by moving the
cursor into the query panel and hitting Ctrl-Space to see what other query parameters are possible.

![GraphiQL](images/graphiql-autocomplete.png)
![GraphiQL](../images/graphiql-autocomplete.png)

The explorer also has documentation built into it. If you hover your pointer over a property on the
left hand side you can see its documentation.

![GraphiQL](images/graphiql-documentation.png)
![GraphiQL](../images/graphiql-documentation.png)

## A more advanced query

Expand All @@ -71,9 +71,9 @@ Most people want to get routing results out of OTP, so lets see the query for th
```graphql
{
plan(
# these coordinate are in Portland, change this to YOUR origin
# these coordinates are in Portland, change this to YOUR origin
from: { lat: 45.5552, lon: -122.6534 }
# these coordinate are in Portland, change this to YOUR destination
# these coordinates are in Portland, change this to YOUR destination
to: { lat: 45.4908, lon: -122.5519 }
# use the correct date and time of your request
date: "2023-02-15",
Expand Down Expand Up @@ -127,4 +127,4 @@ Most people want to get routing results out of OTP, so lets see the query for th
Again, please use the autocomplete and documentation viewers to figure out what each input parameter
and property means.

More examples for a variety of queries can also be found [in the test code](https://github.com/opentripplanner/OpenTripPlanner/tree/dev-2.x/src/ext-test/resources/gtfsgraphqlapi/queries).
More examples for a variety of queries can also be found [in the test code](https://github.com/opentripplanner/OpenTripPlanner/tree/dev-2.x/src/test/resources/org/opentripplanner/apis/gtfs/queries).
4 changes: 2 additions & 2 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
mkdocs==1.5.2
mkdocs-material==9.1.17
mkdocs==1.5.3
mkdocs-material==9.4.2
mike@git+https://github.com/jimporter/mike.git@f0522f245e64687dd18384fbd86b721175711474
mkdocs-no-sitemap-plugin==0.0.1
Loading
Loading