OpenAPI

Generates an OpenAPI spec and docs UI from collections, globals and endpoints

Community 125 30.8k/wk MIT v0.3.1

Installation

pnpm add payload-oapi

About

OpenAPI generates an OpenAPI specification from your Payload instance, covering collection and global CRUD endpoints, preferences and authentication operations. The spec is served at an API route, so it stays in sync with the collections you define. You can narrow the output to chosen collections and globals, hide Payload's internal collections, and change the path prefix when clients reach the API through a proxy.

Optional viewers for the same document are Scalar, Swagger UI, RapiDoc and Redoc, served from your site. Custom endpoints can be documented too, and the final document can be adjusted per request, for example to add routes Payload does not serve. The output can feed client SDK generators.

Package info

Package name
payload-oapi
Latest version
0.3.1
Unpacked size
189 kB
License
MIT
Weekly downloads
30.8k
Last publish
Oct 3, 2026

Similar plugins

More in Devtools

Chat agent that composes and edits Payload pages from your block library

Exposes Payload collections and globals to AI agents through the Model Context Protocol

Lets AI assistants read and edit Payload content over MCP with scoped API keys

Editorial suite that lets teams run a Payload site through MCP tools and AI assistants

Typed block registry and React Server Component renderer for Payload blocks

Runs Payload CMS admin and APIs under vinext, on Node or Cloudflare Workers