docs: use permalinks for db-stations@3 & db-stations-autocomplete@2 links 📝

This commit is contained in:
Jannis R 2022-11-22 15:38:58 +01:00
parent ef3760ffd3
commit 04f2d5d9c2
No known key found for this signature in database
GPG key ID: 0FE83946296A88A5
4 changed files with 9 additions and 9 deletions

View file

@ -50,7 +50,7 @@ Uses [\`hafasClient.departures()\`](https://github.com/public-transport/hafas-cl
Works like [\`/stops/:id/departures\`](#get-stopsiddepartures), except that it uses [\`hafasClient.arrivals()\`](https://github.com/public-transport/hafas-client/blob/5/docs/arrivals.md) to **arrivals at a stop/station**. Works like [\`/stops/:id/departures\`](#get-stopsiddepartures), except that it uses [\`hafasClient.arrivals()\`](https://github.com/public-transport/hafas-client/blob/5/docs/arrivals.md) to **arrivals at a stop/station**.
`, `,
'/stations': `\ '/stations': `\
If the \`query\` parameter is used, it will use [\`db-stations-autocomplete\`](https://npmjs.com/package/db-stations-autocomplete) to autocomplete *Deutsche Bahn*-operated stops/stations. Otherwise, it will filter the stops/stations in [\`db-stations\`](https://npmjs.com/package/db-stations). If the \`query\` parameter is used, it will use [\`db-stations-autocomplete@2\`](https://github.com/derhuerst/db-stations-autocomplete/tree/2.2.0) to autocomplete *Deutsche Bahn*-operated stops/stations. Otherwise, it will filter the stops/stations in [\`db-stations@3\`](https://github.com/derhuerst/db-stations/tree/3.0.1).
Instead of receiving a JSON response, you can request [newline-delimited JSON](http://ndjson.org) by sending \`Accept: application/x-ndjson\`. Instead of receiving a JSON response, you can request [newline-delimited JSON](http://ndjson.org) by sending \`Accept: application/x-ndjson\`.
`, `,

View file

@ -466,7 +466,7 @@ curl "https://v5.db.transport.rest/trips/$(echo $trip_id | url-encode)" -s | jq
## `GET /stations` ## `GET /stations`
If the `query` parameter is used, it will use [`db-stations-autocomplete`](https://npmjs.com/package/db-stations-autocomplete) to autocomplete *Deutsche Bahn*-operated stops/stations. Otherwise, it will filter the stops/stations in [`db-stations`](https://npmjs.com/package/db-stations). If the `query` parameter is used, it will use [`db-stations-autocomplete@2`](https://github.com/derhuerst/db-stations-autocomplete/tree/2.2.0) to autocomplete *Deutsche Bahn*-operated stops/stations. Otherwise, it will filter the stops/stations in [`db-stations@3`](https://github.com/derhuerst/db-stations/tree/3.0.1).
Instead of receiving a JSON response, you can request [newline-delimited JSON](http://ndjson.org) by sending `Accept: application/x-ndjson`. Instead of receiving a JSON response, you can request [newline-delimited JSON](http://ndjson.org) by sending `Accept: application/x-ndjson`.
@ -474,7 +474,7 @@ Instead of receiving a JSON response, you can request [newline-delimited JSON](h
parameter | description | type | default value parameter | description | type | default value
----------|-------------|------|-------------- ----------|-------------|------|--------------
`query` | Find stations by name using [`db-stations-autocomplete`](https://npmjs.com/package/db-stations-autocomplete). | string | `query` | Find stations by name using [`db-stations-autocomplete@2`](https://github.com/derhuerst/db-stations-autocomplete/tree/2.2.0). | string |
`limit` | *If `query` is used:* Return at most `n` stations. | number | `3` `limit` | *If `query` is used:* Return at most `n` stations. | number | `3`
`fuzzy` | *If `query` is used:* Find stations despite typos. | boolean | `false` `fuzzy` | *If `query` is used:* Find stations despite typos. | boolean | `false`
`completion` | *If `query` is used:* Autocomplete stations. | boolean | `true` `completion` | *If `query` is used:* Autocomplete stations. | boolean | `true`

View file

@ -30,7 +30,7 @@ stationRoute.openapiPaths = {
get: { get: {
summary: 'Returns a stop/station from `db-stations`.', summary: 'Returns a stop/station from `db-stations`.',
description: `\ description: `\
Returns a stop/station from [\`db-stations\`](https://npmjs.com/package/db-stations).`, Returns a stop/station from [\`db-stations@3\`](https://github.com/derhuerst/db-stations/tree/3.0.1).`,
parameters: [{ parameters: [{
name: 'id', name: 'id',
in: 'path', in: 'path',
@ -42,7 +42,7 @@ Returns a stop/station from [\`db-stations\`](https://npmjs.com/package/db-stati
}], }],
responses: { responses: {
'2XX': { '2XX': {
description: 'A stop/station, in the [`db-stations` format](https://github.com/derhuerst/db-stations/blob/master/readme.md).', description: 'A stop/station, in the [`db-stations@3` format](https://github.com/derhuerst/db-stations/blob/3.0.1/readme.md).',
content: { content: {
'application/json': { 'application/json': {
schema: { schema: {

View file

@ -114,13 +114,13 @@ stationsRoute.openapiPaths = {
get: { get: {
summary: 'Autocompletes stops/stations by name or filters stops/stations.', summary: 'Autocompletes stops/stations by name or filters stops/stations.',
description: `\ description: `\
If the \`query\` parameter is used, it will use [\`db-stations-autocomplete\`](https://npmjs.com/package/db-stations-autocomplete) to autocomplete *Deutsche Bahn*-operated stops/stations by name. Otherwise, it will filter the stops/stations in [\`db-stations\`](https://npmjs.com/package/db-stations). If the \`query\` parameter is used, it will use [\`db-stations-autocomplete@2\`](https://github.com/derhuerst/db-stations-autocomplete/tree/2.2.0) to autocomplete *Deutsche Bahn*-operated stops/stations by name. Otherwise, it will filter the stops/stations in [\`db-stations@3\`](https://github.com/derhuerst/db-stations/tree/3.0.1).
Instead of receiving a JSON response, you can request [newline-delimited JSON](http://ndjson.org) by sending \`Accept: application/x-ndjson\`.`, Instead of receiving a JSON response, you can request [newline-delimited JSON](http://ndjson.org) by sending \`Accept: application/x-ndjson\`.`,
parameters: [{ parameters: [{
name: 'query', name: 'query',
in: 'query', in: 'query',
description: 'Find stations by name using [`db-stations-autocomplete`](https://npmjs.com/package/db-stations-autocomplete).', description: 'Find stations by name using [`db-stations-autocomplete@2`](https://github.com/derhuerst/db-stations-autocomplete/tree/2.2.0).',
schema: { schema: {
type: 'string', type: 'string',
}, },
@ -151,7 +151,7 @@ Instead of receiving a JSON response, you can request [newline-delimited JSON](h
}], }],
responses: { responses: {
'2XX': { '2XX': {
description: 'An array of stops/stations, in the [`db-stations` format](https://github.com/derhuerst/db-stations/blob/master/readme.md).', description: 'An array of stops/stations, in the [`db-stations@3` format](https://github.com/derhuerst/db-stations/blob/3.0.1/readme.md).',
content: { content: {
'application/json': { 'application/json': {
schema: { schema: {
@ -169,7 +169,7 @@ Instead of receiving a JSON response, you can request [newline-delimited JSON](h
stationsRoute.queryParameters = { stationsRoute.queryParameters = {
query: { query: {
description: 'Find stations by name using [`db-stations-autocomplete`](https://npmjs.com/package/db-stations-autocomplete).', description: 'Find stations by name using [`db-stations-autocomplete@2`](https://github.com/derhuerst/db-stations-autocomplete/tree/2.2.0).',
type: 'string', type: 'string',
defaultStr: '', defaultStr: '',
}, },