npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@bedtime-coders/elysia-openapi

v1.1.0

Published

Plugin for Elysia to auto-generate OpenAPI page

Readme

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.

Add it to your Elysia app

bun add @bedtime-coders/elysia-openapi

Try it out

import { Elysia, t } from 'elysia'
import { openapi } from '@bedtime-coders/elysia-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 ✨

Changes from @elysiajs/swagger

  • Update core dependencies to the latest versions (at the time of writing)
  • Ability to set any theme for Scalar API Reference, not just elysiajs
  • Rename plugin to openapi (was swagger)
  • Change the default API Reference path to /docs (was /swagger)
  • Change the default openapi.json path to /docs/json (was /swagger/json)

Give us a ⭐️

Hey! If you like this plugin, please give us a ⭐️ on GitHub so more people can find it. Thank you!

Configuration for nerds

provider

@default 'scalar'

Choose between Scalar API Reference & Swagger UI

scalar

Customize scalarConfig, refers to Scalar config

swagger

Customize 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