Skip to content

fix: update Swagger plugin install to use @elysiajs/swagger - #874

Open
pvlvld wants to merge 2 commits into
elysiajs:mainfrom
pvlvld:main
Open

fix: update Swagger plugin install to use @elysiajs/swagger#874
pvlvld wants to merge 2 commits into
elysiajs:mainfrom
pvlvld:main

Conversation

@pvlvld

@pvlvld pvlvld commented Aug 6, 2026

Copy link
Copy Markdown

Update installation command for Swagger plugin to use @elysiajs/swagger

https://www.npmjs.com/package/@elysiajs/swagger

Summary by CodeRabbit

  • Documentation
    • Corrected the Swagger plugin package name in OpenAPI and Swagger documentation metadata.
    • Updated installation instructions and TypeScript import examples to use @elysiajs/swagger.
    • Updated package references in dependency-checking and migration examples for consistency.
    • Improved documentation accuracy for users installing or migrating to the Swagger plugin.

@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

The documentation now uses @elysiajs/swagger in metadata, installation commands, imports, and migration examples.

Changes

Swagger documentation updates

Layer / File(s) Summary
Correct Swagger package references
docs/plugins/openapi.md, docs/plugins/swagger.md, docs/eden/installation.md, docs/migrate/from-fastify.txt
Updated package references across metadata, commands, imports, and examples.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Possibly related PRs

Poem

Scoped names now shine bright ♡
Metadata points right~
Imports no longer stray
Tiny docs fixed today
Try not to miss it, dummy~ ( ̄▽ ̄)♡

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 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 summarizes the main documentation change to use the scoped Swagger package name.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/plugins/swagger.md`:
- Line 29: Update the remaining Swagger import examples in
docs/plugins/swagger.md to use the installed package name `@elysiajs/swagger`
instead of `@elysia/swagger`, including all three import occurrences referenced in
the documentation.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: b67daafa-2366-48e4-bdb5-94feea1bd128

📥 Commits

Reviewing files that changed from the base of the PR and between 5bd87eb and e5f7a91.

📒 Files selected for processing (2)
  • docs/plugins/openapi.md
  • docs/plugins/swagger.md

Comment thread docs/plugins/swagger.md

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/migrate/from-fastify.txt`:
- Line 1226: Update the OpenAPI comparison description near the
`@elysia/openapi` import reference to name `@elysia/openapi` instead of
`@elysiajs/swagger`, keeping the surrounding Scalar and Swagger wording
unchanged.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: ed48e9d8-50ef-4f2d-9cd2-c9e64a37e81d

📥 Commits

Reviewing files that changed from the base of the PR and between e5f7a91 and fa9aba2.

📒 Files selected for processing (3)
  • docs/eden/installation.md
  • docs/migrate/from-fastify.txt
  • docs/plugins/swagger.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • docs/plugins/swagger.md

<template v-slot:right-content>

> Elysia use `@elysia/swagger` for OpenAPI documentation using Scalar by default, or optionally Swagger
> Elysia use `@elysiajs/swagger` for OpenAPI documentation using Scalar by default, or optionally Swagger

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Verify that each documentation example uses one consistent package/API pair.
rg -n -C 3 '`@elysia`(openapi|js/swagger)|\b(openapi|swagger)\(\)|Scalar|Swagger' \
  docs/migrate/from-fastify.txt \
  docs/plugins/openapi.md \
  docs/plugins/swagger.md

Repository: elysiajs/documentation

Length of output: 12528


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "## Relevant migration section"
sed -n '1118,1232p' docs/migrate/from-fastify.txt | cat -n -v | sed 's/^/   /'

echo
echo "## Repository package metadata references"
git ls-files | rg '(^|/)(package\.json|bun\.lockb|bun\.lock|pnpm-lock\.yaml|yarn\.lock)$' || true
rg -n '"name"\s*:\s*"(?:`@elysia/openapi`|`@elysiajs/swagger`)"|`@elysia/openapi`|`@elysiajs/swagger`|export \* as openapi|export \* as swagger|openapi:\s*\{|swagger:\s*\{|const openapi|const swagger' . \
  --glob '!vendor/**' --glob '!node_modules/**' --glob '!dist/**' --glob '!build/**' | head -200

Repository: elysiajs/documentation

Length of output: 9579


Fix the comparison package label, dummy~ ♡

This section is for OpenAPI and the code uses import { openapi } from '@elysia/openapi', but the description still says @elysiajs/swagger. Change the description to @elysia/openapi so the example and text match. (ง ˃̣̣̥̀ᴗ˂̣̣̥́)ง~♡

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/migrate/from-fastify.txt` at line 1226, Update the OpenAPI comparison
description near the `@elysia/openapi` import reference to name
`@elysia/openapi` instead of `@elysiajs/swagger`, keeping the surrounding Scalar
and Swagger wording unchanged.

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