Skip to content

Commit c3da460

Browse files
Add documentation
1 parent 43a6826 commit c3da460

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

docs/Migrating-Configuration.md

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
While OTP's GraphQL APIs are very, very stable even across versions, the JSON configuration schema
2+
is not. Changes to it are relatively frequent and you can see all PRs that change it with
3+
the [Github tag 'config change'](https://github.com/opentripplanner/OpenTripPlanner/pulls?q=label%3A%22config+change%22).
4+
5+
### Migrating the JSON configuration
6+
7+
OTP validates the configuration and prints warnings during startup. This means that when you
8+
migrate to a newer version, you should carefully inspect the logs. If you see messages like
9+
10+
```
11+
(NodeAdapter.java:170) Unexpected config parameter: 'routingDefaults.stairsReluctance:1.65' in 'router-config.json'
12+
```
13+
14+
this means there are properties in your configuration that are unknown to OTP and therefore likely
15+
to be a configuration error, perhaps because the schema was changed. In such a case you should
16+
consult the [feature](Configuration.md#otp-features), [router](RouterConfiguration.md) or
17+
[build configuration documentation](BuildConfiguration.md) to find out what he new schema looks like.
18+
19+
### Aborting on invalid configuration
20+
21+
If you want OTP to abort the startup when encountering invalid configuration, you can add the flag
22+
`--configCheck` to your regular OTP CLI commands.
23+
24+
This should of course be used wisely as it can also accidentally make your production instances refuse
25+
to start up.
26+
Therefore, we recommend that you use it only in a separate pre-production step, perhaps during graph
27+
build.

mkdocs.yml

+1
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ nav:
7575
- Router: 'RouterConfiguration.md'
7676
- "Route Request": 'RouteRequest.md'
7777
- "Realtime Updaters": 'UpdaterConfig.md'
78+
- "Migrating Configuration": 'Migrating-Configuration.md'
7879
- Features explained:
7980
- "Routing modes": 'RoutingModes.md'
8081
- "In-station navigation": 'In-Station-Navigation.md'

0 commit comments

Comments
 (0)