Skip to content

Commit

Permalink
docs(config): update documentation for customizing OpenAPI endpoints
Browse files Browse the repository at this point in the history
Update the existing OpenAPI endpoint documentation and provide detailed
instructions on how to customize the endpoints using configuration options.

Fix incorrect OpenAPI endpoints.

Please see issue #2867
  • Loading branch information
KRAH Sebastian (ICS480) committed Nov 11, 2024
1 parent 8c934c9 commit f1f5746
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion docs/3.config/0.index.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Enable experimental features.

#### `openAPI`

Enable `/_nitro/scalar`, `/_nitro/swagger` and `/_nitro/openapi.json` endpoints.
Enable `/_scalar`, `/_swagger` and `/_openapi.json` endpoints.

- Default: `false`

Expand Down Expand Up @@ -68,6 +68,22 @@ openAPI: {
}
```

Or if you want to customize the endpoints:

```js
openAPI: {
route: "/_nitro/openapi.json",
ui: {
scalar: {
route: "/_nitro/scalar"
},
swagger: {
route: "/_nitro/swagger"
}
}
}
```

#### `wasm`

Enable WASM support
Expand Down

0 comments on commit f1f5746

Please sign in to comment.