Skip to content

Commit

Permalink
Add section to docs for new option
Browse files Browse the repository at this point in the history
  • Loading branch information
awarrenlove committed Feb 11, 2022
1 parent 9622e96 commit 4035dc7
Showing 1 changed file with 38 additions and 1 deletion.
39 changes: 38 additions & 1 deletion website/docs/getting-started/Installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,41 @@ npm i --save redocusaurus
};
```

The API Doc will be available by default at `/api/` path. To customize it see [full plugin options](#options).
The API Doc will be available by default at `/api/` path. If you wish to
override this path, you may set the `routePath` option. To skip adding a
route altogether, set the `addRoute` option to false. You will still be
able to reference schema elements manually using [Schema Imports](/docs/guides/schema-imports).

```js
// docusaurus.config.js
module.exports = {
// ...
presets: [
[
'redocusaurus',
{
specs: [
{
id: 'default-route',
// routePath: '/api/',
// addRoute: true,
},
{
id: 'route-overridden',
routePath: '/different-path/',
// addRoute: true,
},
{
id: 'no-route',
addRoute: false,
},
],
},
],
],
// ...
};
```

To customize it see [full plugin options](#options).

0 comments on commit 4035dc7

Please sign in to comment.