Skip to content

Conversation

jmcudd
Copy link

@jmcudd jmcudd commented Oct 8, 2025

cdn is not part of the official Scalar configuration, but it is part of the Scalar plugin and provides a means of overriding the scalar URI to the scalar bundle.

Summary by CodeRabbit

  • Documentation
    • Added a “Self-hosted Scalar bundle” subsection to the OpenAPI plugin docs.
    • Shows how to configure a custom self-hosted CDN path for the Scalar bundle.
    • Demonstrates disabling default fonts for greater styling control.
    • Clarifies options for hosting assets locally and adjusting appearance.
    • Documentation-only; no functional changes to the product.

`cdn` is not part of the official Scalar configuration, but it is part of the Scalar plugin and provides a means of overriding the scalar URI to the scalar bundle.
Copy link

coderabbitai bot commented Oct 8, 2025

Walkthrough

Adds a "Self-hosted Scalar bundle" subsection to the OpenAPI plugin docs showing scalar configuration with a self-hosted CDN path (cdn: "/public/scalar-standalone.min.js") and withDefaultFonts: false. The same example is inserted in two places; no code changes.

Changes

Cohort / File(s) Summary
Docs: OpenAPI plugin configuration
docs/plugins/openapi.md
Added "Self-hosted Scalar bundle" subsection(s) demonstrating scalar config with cdn: "/public/scalar-standalone.min.js" and withDefaultFonts: false. Example duplicated in two locations. No functional code changes.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

I thump a note on docs today,
A local CDN leads the way,
Fonts tucked in a quiet nest,
Scalar bundled for the rest.
Two echoes hum — the README's best. 🥕

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 describes the main change of updating the scalar documentation in the openapi.md file, providing just enough context without extra noise.
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

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between af8c3d7 and 625a309.

📒 Files selected for processing (1)
  • docs/plugins/openapi.md (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • docs/plugins/openapi.md

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: 0

🧹 Nitpick comments (1)
docs/plugins/openapi.md (1)

169-180: Clarify plugin-specific override for cdn

Add a note that cdn is an Elysia OpenAPI plugin option (not part of Scalar’s native config) and update inline comments for clarity.

Apply this diff:

### Self-hosted Scalar bundle

-Self-host the Scalar bundle and disable CDN Fonts.
+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({ 
+  openapi({
     scalar: {
-      cdn: "/public/scalar-standalone.min.js", //Self-hosted
-      withDefaultFonts: false, //Disable CDN Fonts
+      cdn: "/public/scalar-standalone.min.js", // plugin override for Scalar bundle URI (self-hosted)
+      withDefaultFonts: false, // disable Scalar’s default font CDN
     },
   })

</blockquote></details>

</blockquote></details>

<details>
<summary>📜 Review details</summary>

**Configuration used**: CodeRabbit UI

**Review profile**: CHILL

**Plan**: Pro

<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between b6a67d1e78e78d17e1a1d8194b0e7b72d90c4d84 and af8c3d7caaea8db34606915f609358fb1f7a3446.

</details>

<details>
<summary>📒 Files selected for processing (1)</summary>

* `docs/plugins/openapi.md` (1 hunks)

</details>

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->

Incorporated @coderabbitai's nitpick comments.
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