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

node-red-contrib-openapi3

v0.1.0

Published

A set of tools for generating OpenAPI 3.0 documentation based on the HTTP nodes deployed in a flow

Readme

node-red-contrib-openapi3

OpenAPI 3.0.3 documentation generator for Node-RED. Automatically creates Swagger UI documentation from http-in nodes in your flow.

Features

  • ✅ Auto-discovery of http-in endpoints
  • ✅ Visual editor for each endpoint
  • ✅ Parameters (query, path, header, cookie)
  • ✅ Request Body with inline schema or $ref
  • ✅ Multiple Examples for Request/Response (dropdown in Swagger UI)
  • ✅ Responses with any HTTP status codes
  • ✅ Reusable Schemas
  • ✅ Security schemes (API Key, Bearer, OAuth2, etc.)
  • ✅ JSON validation for object/array types
  • ✅ Exclude/Include endpoints
  • ✅ Built-in Swagger UI

Installation

Via Node-RED Palette Manager

  1. Open Node-RED
  2. Menu → Manage palette → Install
  3. Search for node-red-contrib-openapi3
  4. Click Install

Via npm

cd ~/.node-red
npm install node-red-contrib-openapi3

Usage

1. Add swagger-doc node

  1. Find swagger-doc node in the palette (Network section)
  2. Drag it onto your flow
  3. Double-click to configure

2. Configure global settings (settings.js)

module.exports = {
    // ... other settings
    
    openapi: {
        info: {
            title: "My API",
            version: "1.0.0",
            description: "API documentation"
        },
        servers: [
            { url: "http://localhost:1880", description: "Development" }
        ],
        components: {
            securitySchemes: {
                apiKey: {
                    type: "apiKey",
                    in: "header",
                    name: "X-API-Key"
                },
                bearerAuth: {
                    type: "http",
                    scheme: "bearer",
                    bearerFormat: "JWT"
                }
            },
            schemas: {
                Error: {
                    type: "object",
                    properties: {
                        statusCode: { type: "integer" },
                        error: { type: "string" },
                        message: { type: "string" }
                    }
                }
            }
        }
    }
};

3. Document your endpoints

Double-click swagger-doc node and fill in:

Info tab:

  • Summary, Description, Tags
  • Exclude (hide endpoint from docs)

Parameters tab:

  • Query, Path, Header parameters

Request Body tab:

  • Schema Properties (field types)
  • Examples (variants for dropdown)

Responses tab:

  • HTTP codes (200, 400, 401, etc.)
  • Schema Properties
  • Examples

Schemas tab:

  • Reusable schemas ($ref)

Security tab:

  • API Key, Bearer, OAuth2

4. Access documentation

After deploy:

  • Swagger UI: http://localhost:1880/api-docs
  • OpenAPI JSON: http://localhost:1880/api-docs/swagger.json

Examples

Simple GET endpoint

Parameters:
├── limit (query, integer, example: 10)
├── offset (query, integer, example: 0)
└── status (query, string, example: "active")

Response 200:
├── data (array)
├── total (integer)
└── limit (integer)

POST with Examples (RPC-style API)

Request Body Schema:
├── action (string, required)
└── params (object, required)

Request Examples:
├── getItems → {"action": "getItems", "params": {"id": 1}}
├── createItem → {"action": "create", "params": {"name": "test"}}
└── deleteItem → {"action": "delete", "params": {"id": 1}}

Swagger UI will show a dropdown to select examples.

Response with Examples

Response 200 Schema:
├── statusCode (integer)
├── data (array)
└── meta (object)

Response Examples:
├── successList → {"statusCode": 200, "data": [...], "meta": {...}}
└── emptyList → {"statusCode": 200, "data": [], "meta": {...}}

settings.js Options

| Option | Description | Default | |--------|-------------|---------| | openapi.info.title | API title | "Node-RED API" | | openapi.info.version | API version | "1.0.0" | | openapi.info.description | API description | "" | | openapi.servers | Server list | [] | | openapi.components.securitySchemes | Auth schemes | {} | | openapi.components.schemas | Global schemas | {} | | openapi.onlyDocumented | Show only documented endpoints | false |

Compatibility

  • Node-RED: >= 2.0.0
  • Node.js: >= 18.0.0
  • OpenAPI: 3.0.3

License

Apache-2.0

Credits

Based on node-red-contrib-swagger by Steve Bassett.