From acb9be27fde425eb246c2099228b89f932637cdc Mon Sep 17 00:00:00 2001 From: PoRi <1960825664@qq.com> Date: Tue, 14 Oct 2025 14:57:32 +0800 Subject: [PATCH 1/3] :blue_book: doc: fix code block formatting in better-auth integration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Fix code block formatting in better-auth.md - Add proper code highlighting for openAPI plugin usage 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- docs/integrations/better-auth.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/integrations/better-auth.md b/docs/integrations/better-auth.md index 516b3e32..dde38770 100644 --- a/docs/integrations/better-auth.md +++ b/docs/integrations/better-auth.md @@ -98,7 +98,13 @@ However if we are using [@elysiajs/openapi](/plugins/openapi), you might want to We may do that with the following code: + ```ts +export const auth = betterAuth({ +  plugins: [openAPI()], // [!code ++] +}); + + import { openAPI } from 'better-auth/plugins' let _schema: ReturnType From fe0d7a2b9be3a1ab4ec45a72324865c426e02f32 Mon Sep 17 00:00:00 2001 From: PoRi <1960825664@qq.com> Date: Fri, 17 Oct 2025 11:48:36 +0800 Subject: [PATCH 2/3] Update .gitignore and improve better-auth docs Added .obsidian/ to .gitignore to exclude Obsidian workspace files. Improved documentation for better-auth integration by correcting the server URL format and reorganizing plugin import statements for clarity. --- .gitignore | 2 ++ docs/integrations/better-auth.md | 8 +++----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 5c8ae45e..24be0112 100644 --- a/.gitignore +++ b/.gitignore @@ -174,3 +174,5 @@ dist **/.vitepress/cache **/.vitepress/dist + +.obsidian/* diff --git a/docs/integrations/better-auth.md b/docs/integrations/better-auth.md index dde38770..f48d40eb 100644 --- a/docs/integrations/better-auth.md +++ b/docs/integrations/better-auth.md @@ -48,7 +48,7 @@ const app = new Elysia() .listen(3000) console.log( - `🦊 Elysia is running at ${app.server?.hostname}:${app.server?.port}` + `🦊 Elysia is running at http://${app.server?.hostname}:${app.server?.port}` ) ``` @@ -100,13 +100,11 @@ We may do that with the following code: ```ts +import { openAPI } from 'better-auth/plugins' export const auth = betterAuth({ -  plugins: [openAPI()], // [!code ++] + plugins: [openAPI()], // [!code ++] }); - -import { openAPI } from 'better-auth/plugins' - let _schema: ReturnType const getSchema = async () => (_schema ??= auth.api.generateOpenAPISchema()) From d8c49cdf93d9b54ddbfa10c09aaadce586839423 Mon Sep 17 00:00:00 2001 From: PoRi <1960825664@qq.com> Date: Tue, 21 Oct 2025 11:18:06 +0800 Subject: [PATCH 3/3] Update openapi.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit turbomonorepo,no need root path --- docs/patterns/openapi.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/patterns/openapi.md b/docs/patterns/openapi.md index 839f2fe2..682a39eb 100644 --- a/docs/patterns/openapi.md +++ b/docs/patterns/openapi.md @@ -104,7 +104,7 @@ const app = new Elysia() Having issues with type generation? ### Caveats: Root path -As it's unreliable to guess to root of the project, it's recommended to provide the path to the project root to allow generator to run correctly, especially when using monorepo. +If you use turbomonorepo, you don't need to worry about the root path . As it's unreliable to guess to root of the project, it's recommended to provide the path to the project root to allow generator to run correctly, especially when using monorepo. ```ts import { Elysia, t } from 'elysia'