Skip to content

Commit

Permalink
docs(config): document openAPI.production option (#2940)
Browse files Browse the repository at this point in the history
  • Loading branch information
mirsella authored Dec 19, 2024
1 parent 26726be commit 1767019
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions docs/3.config/0.index.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,16 @@ openAPI: {
}
```

Theses routes are disabled by default in production. To enable them, use the `production` key.
`"runtime"` allows middleware usage, and `"prerender"` is the most efficient because the JSON response is constant.

```js
openAPI: {
// IMPORTANT: make sure to protect OpenAPI routes if necessary!
production: "runtime", // or "prerender"
}
```

If you like to customize the Scalar integration, you can [pass a configuration object](https://github.com/scalar/scalar) like this:

```js
Expand Down

0 comments on commit 1767019

Please sign in to comment.