explaingit

maximseshuk/payload-plugin-openapi

Analysis updated 2026-05-18

9TypeScriptAudience · developerComplexity · 2/5Setup · easy

TLDR

A Payload CMS plugin that auto-generates OpenAPI 3.0/3.1/3.2 documentation from your CMS config. Adds an interactive API browser at /api/docs with no manual annotation needed.

Mindmap

mindmap
  root((payload-plugin-openapi))
    What it does
      Auto-generate OpenAPI spec
      Zero annotation needed
      Reads Payload config
    Doc Browsers
      Scalar UI
      Swagger UI
    Customization
      Filter entities
      Custom endpoints
      OpenAPI 3.0/3.1/3.2
      File output for CI
    Tech
      TypeScript
      Payload CMS
      Node.js 20+
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Instantly add interactive API docs to a Payload CMS project with two lines of config

USE CASE 2

Export an OpenAPI spec file from Payload CMS for use in client SDK generation or CI schema diffs

USE CASE 3

Expose a filtered subset of Payload endpoints as a public-facing API reference

USE CASE 4

Document custom Payload endpoints alongside auto-generated ones in a single unified spec

What is it built with?

TypeScriptPayload CMSOpenAPINode.js

How does it compare?

maximseshuk/payload-plugin-openapiobaidqatan/liquid-glass-component-librarycodee-sh/payload-training-app
Stars9910
LanguageTypeScriptTypeScriptTypeScript
Setup difficultyeasyeasymoderate
Complexity2/52/54/5
Audiencedevelopervibe coderdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min

Requires Payload CMS 3.53.0 or newer and Node.js 20+, metadata.title and metadata.version are required or the plugin throws on startup.

License file is present in the repository but the license type is not stated in the README text.

In plain English

This is a plugin for Payload CMS that automatically generates API documentation. Payload CMS is a content management system built with TypeScript that developers use to build websites and apps with a structured content backend. This plugin reads your Payload configuration and produces an OpenAPI document, which is a standard format for describing what API endpoints exist, what data they accept, and what they return. The main benefit is that no manual annotation is required. Rather than writing out each endpoint in a documentation format by hand, the plugin inspects your Payload collections, global settings, authentication routes, content versions, and scheduled jobs, and generates the documentation automatically. You can then browse that documentation through an interactive interface at a URL like /api/docs. The plugin supports two visual documentation browsers: Scalar and Swagger UI. Both display the endpoints as clickable, interactive pages where you can send test requests directly from the browser. You add one or two lines to your Payload configuration, and the documentation appears immediately. The documentation endpoint itself is at /api/openapi.json by default. There are several ways to customize it. You can filter which collections and operations appear in the documentation, add descriptions to specific fields, document custom API routes that Payload does not generate automatically, and choose between OpenAPI versions 3.0, 3.1, and 3.2. The plugin also supports caching the generated document in memory so it does not rebuild on every request. For automated workflows, the spec can be written to a file for use in testing pipelines or code generation tools. Installing the plugin requires Payload version 3.53.0 or newer and Node.js 20 or later. It is available on npm as @seshuk/payload-plugin-openapi.

Copy-paste prompts

Prompt 1
I have a Payload CMS 3 project. How do I add @seshuk/payload-plugin-openapi to generate interactive API docs at /api/docs?
Prompt 2
How do I exclude specific Payload collections from the generated OpenAPI spec using the filters option?
Prompt 3
How do I document a custom Payload endpoint that is not auto-generated by the plugin?
Prompt 4
How do I write the OpenAPI spec to a file in CI using payload-plugin-openapi instead of serving it at runtime?

Frequently asked questions

What is payload-plugin-openapi?

A Payload CMS plugin that auto-generates OpenAPI 3.0/3.1/3.2 documentation from your CMS config. Adds an interactive API browser at /api/docs with no manual annotation needed.

What language is payload-plugin-openapi written in?

Mainly TypeScript. The stack also includes TypeScript, Payload CMS, OpenAPI.

What license does payload-plugin-openapi use?

License file is present in the repository but the license type is not stated in the README text.

How hard is payload-plugin-openapi to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is payload-plugin-openapi for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Scan in gitsafehub Deploy in gitdeployhub maximseshuk on gitmyhub

Verify against the repo before relying on details.