Skip to content

Conversation

eastgold15
Copy link

@eastgold15 eastgold15 commented Oct 14, 2025

Summary

  • Fix code block formatting in better-auth.md documentation
  • Add proper code highlighting for openAPI plugin usage example
  • Improve readability of the integration example

Test plan

  • Review the documentation changes in better-auth.md
  • Verify code blocks are properly formatted and highlighted
  • Check that the example is clear and easy to follow

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • Added a Better Auth integration example demonstrating how to enable the OpenAPI plugin.
    • Clarified setup steps for configuring authentication with OpenAPI to generate and reference the schema.
    • Improved code snippet organization and import guidance for a smoother implementation experience.
    • Updated explanations to make it clearer how the OpenAPI schema is produced and used within the documentation.

- 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 <[email protected]>
Copy link

coderabbitai bot commented Oct 14, 2025

Walkthrough

The docs updated the Better Auth integration example to show configuring betterAuth with the OpenAPI plugin, adjusting imports and the snippet to include openAPI() from better-auth/plugins.

Changes

Cohort / File(s) Summary
Docs: Better Auth + OpenAPI example
docs/integrations/better-auth.md
Replaced/updated example to import openAPI from better-auth/plugins and configure betterAuth({ plugins: [openAPI()] }); re-ordered imports accordingly.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

Poem

I nibble notes where plugins play,
OpenAPI hops in, leading the way.
With imports tidy and snippets bright,
The schema garden blooms just right.
Thump-thump! Docs align—
A rabbit’s review, concise and fine. 🥕

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title clearly and concisely identifies the main change—fixing code block formatting in the Better Auth integration documentation—using an appropriate "docs" prefix. It matches the summary of updating code highlighting in better-auth.md without extraneous detail.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3d2186d and acb9be2.

📒 Files selected for processing (1)
  • docs/integrations/better-auth.md (1 hunks)

Comment on lines +101 to 108

```ts
export const auth = betterAuth({
  plugins: [openAPI()], // [!code ++]
});


import { openAPI } from 'better-auth/plugins'
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant