Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions docs/integrations/better-auth.md
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Comment on lines +101 to 108
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Move the openAPI import into the code fence

The snippet now references openAPI() but the corresponding import sits outside the fenced block, so the rendered example is both broken and missing syntax highlighting for that line—exactly what this PR set out to fix. Pull the import back inside the same ````tsfence (ideally aboveexport const auth`) so readers can copy/paste a valid example.

-```ts
-export const auth = betterAuth({
-  plugins: [openAPI()], // [!code ++]
-});
-
-
-import { openAPI } from 'better-auth/plugins'
+```ts
+import { openAPI } from 'better-auth/plugins'
+
+export const auth = betterAuth({
+  plugins: [openAPI()], // [!code ++]
+});
🤖 Prompt for AI Agents
In docs/integrations/better-auth.md around lines 101 to 108, the import for
openAPI is placed outside the TypeScript code fence which breaks the example and
its syntax highlighting; move the line importing openAPI into the same ```ts
fenced block above the export so the snippet is self-contained and
copy/pasteable, ensuring the import appears before export const auth and
removing the duplicate or stray import outside the fence.


let _schema: ReturnType<typeof auth.api.generateOpenAPISchema>
Expand Down