From 49c156073625d2cc8a1fcc1d91946f63a6f1beb9 Mon Sep 17 00:00:00 2001 From: Sebastian Krah Date: Mon, 11 Nov 2024 12:48:18 +0100 Subject: [PATCH] docs(config): update `openAPI` section (#2869) --- docs/3.config/0.index.md | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/docs/3.config/0.index.md b/docs/3.config/0.index.md index dd17c866e6..544ba33141 100644 --- a/docs/3.config/0.index.md +++ b/docs/3.config/0.index.md @@ -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` @@ -68,6 +68,22 @@ openAPI: { } ``` +Or if you want to customize the endpoints: + +```js +openAPI: { + route: "/_docs/openapi.json", + ui: { + scalar: { + route: "/_docs/scalar" + }, + swagger: { + route: "/_docs/swagger" + } + } +} +``` + #### `wasm` Enable WASM support