Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(openapi): support configuration via openapi #2299

Merged
merged 11 commits into from Apr 3, 2024
Merged
22 changes: 22 additions & 0 deletions docs/3.config/0.index.md
Expand Up @@ -42,9 +42,31 @@ Enable experimental features.

Enable `/_nitro/scalar` and `/_nitro/swagger` and `/_nitro/openapi.json` endpoints.

- Default: `false`

> [!IMPORTANT]
> [Scalar](https://scalar.com/) support is currently available in [nightly channel](/guide/nightly).

You can also pass an object to modify your OpenAPI specification:

```js
openAPI: {
title: 'My Awesome Project',
description: 'This might become the next big thing.',
version: '1.0'
}
```

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

```js
openAPI: {
scalar: {
theme: 'purple'
}
}
```

#### `wasm`

Enable WASM support
Expand Down
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -131,6 +131,7 @@
"@azure/functions": "^3.5.1",
"@azure/static-web-apps-cli": "^1.1.7",
"@cloudflare/workers-types": "^4.20240320.1",
"@scalar/api-reference": "^1.20.7",
"@types/aws-lambda": "^8.10.136",
"@types/bun": "^1.0.10",
"@types/estree": "^1.0.5",
Expand Down