
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
elysiajs-openapi
Advanced tools
Use this plugin to effortlessly expose a beautiful OpenAPI reference page from your ElysiaJS application with zero configuration. Just add the plugin to your Elysia app and you're good to go!
👉 Why use this over @elysiajs/swagger? This is a fork of @elysiajs/swagger with updated dependencies and a few opinionated changes. If @elysiajs/swagger suits your needs (and you don't need the latest version of Scalar API Reference), then by all means, use that instead.
bun add elysiajs-openapi
import { Elysia, t } from 'elysia'
import { openapi } from 'elysiajs-openapi'
const app = new Elysia()
.use(openapi())
.get('/', () => 'hi', { response: t.String({ description: 'sample description' }) })
.post(
'/json/:id',
({ body, params: { id }, query: { name } }) => ({
...body,
id,
name
}),
{
params: t.Object({
id: t.String()
}),
query: t.Object({
name: t.String()
}),
body: t.Object({
username: t.String(),
password: t.String()
}),
response: t.Object({
username: t.String(),
password: t.String(),
id: t.String(),
name: t.String()
}, { description: 'sample description' })
}
)
.listen(8080);
Visit http://localhost:8080/docs to see the generated OpenAPI reference page ✨
@elysiajs/swaggerpersistAuththeme for Scalar API Reference, not just elysiajsopenapi (was swagger)/docs (was /swagger)openapi.json path to /docs/json (was /swagger/json)Hey! If you like this plugin, please give us a ⭐️ on GitHub so more people can find it. Thank you!
provider@default 'scalar'
Choose between Scalar API Reference & Swagger UI
scalarCustomize scalarConfig, refers to Scalar config
swaggerCustomize Swagger config, refers to Swagger 3.0.3 config
path@default '/docs'
The endpoint to expose Swagger UI
excludeStaticFile@default true
Determine if Swagger should exclude static files.
exclude@default []
Paths to exclude from the Swagger endpoint
FAQs
Plugin for Elysia to auto-generate OpenAPI page
The npm package elysiajs-openapi receives a total of 2 weekly downloads. As such, elysiajs-openapi popularity was classified as not popular.
We found that elysiajs-openapi demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.