diff --git a/docs/plugins/openapi.md b/docs/plugins/openapi.md index deff24f1..802b8b27 100644 --- a/docs/plugins/openapi.md +++ b/docs/plugins/openapi.md @@ -166,6 +166,21 @@ Additional OpenAPI reference for each endpoint Scalar configuration, refers to [Scalar config](https://github.com/scalar/scalar/blob/main/documentation/configuration.md) +### Self-hosted Scalar bundle + +Self-host the Scalar bundle and disable CDN Fonts. + +Note: `cdn` is an Elysia OpenAPI plugin option (not part of Scalar’s own config); it overrides the URI to the Scalar bundle. + +```typescript + openapi({ + scalar: { + cdn: "/public/scalar-standalone.min.js", // plugin override for Scalar bundle URI (self-hosted) + withDefaultFonts: false, // disable Scalar’s default font CDN + }, + }) +``` + ## specPath @default '/${path}/json'