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 🙏

© 2026 – Pkg Stats / Ryan Hefner

swagger-autogen-hv

v1.0.2

Published

this package is used to automate swagger documentation and help frontend developers to vvisually test what they expect from specific endpoint

Readme

🚀 swagger-autogen-hv

A plug-and-play module to auto-generate Swagger/OpenAPI documentation from route schemas with minimal setup. Perfect for modular Node.js/Express projects that want clean, versioned, and developer-friendly API docs. ✨ Features

🔧 Automatic Swagger Docs – Generate paths from your Joi or validation schemas

🧩 Modular & Scalable – Supports large codebases with modular schema organization

⚡ Zero-Hardcoding – No manual Swagger writing; just pass your schemas

🔒 Production-Safe – Toggle Swagger UI with a single config flag

📦 Installation

npm install swagger-autogen-hv

⚙️ Quick Setup

Integrate with your Express server in a few lines:

📁 Recommended Project Structure

📘 API Reference getOpenApiPaths({ schemas, responses })

Param Type Required Description

schemas Object ✅ Yes Your route validation schemas

responses Object ❌ No Custom Swagger response definitions

setupSwagger(app, options)

Option Type Required Description

app Object ✅ Yes Your Express application instance

documentation Object ✅ Yes Output from getOpenApiPaths()

title String ✅ Yes Title of the Swagger UI

serverUrl String ✅ Yes Base URL of your API

version String ✅ Yes API version number

description String ❌ No Short description of the API

enabled Boolean ✅ Yes Toggle Swagger UI (e.g., disable in prod)

✅ Example Output

Swagger UI will be available at:

http://localhost:PORT/api-docs

Only if enabled: true in the setup. 🛡️ Best Practices

Keep Swagger disabled in production (enabled: config.env !== 'production')

Use consistent and modular naming in your schemas

Define examples and descriptions for better auto-generation quality

🪪 License

MIT – Feel free to use, modify, and contribute!