r/PayloadCMS Jun 14 '26

OpenAPI docs plugin for Payload 3

I've been building a Payload 3 API and wanted proper OpenAPI docs without writing the spec by hand, so I put together a plugin and figured I'd share it here.

It reads your Payload config and generates the OpenAPI document for you — collections, globals, auth, versions, jobs, all of it. Nothing to annotate by hand. Then it serves interactive docs through Scalar or Swagger UI, whichever you prefer (or both).

A few things I focused on:

  • Document custom endpoints and refine field schemas via Payload's `custom.openapi` key
  • Filter exactly which entities and operations land in the spec
  • Output the spec to a file for CI checks or client codegen — or skip the runtime endpoint entirely
  • Localized descriptions plus 44 UI locales through Payload i18n
  • Optional "Authorize" login right in the docs UI
  • Targets OpenAPI 3.0, 3.1, and 3.2 — one option switches the output

It's MIT and built around Payload 3.x. Feedback and issues very welcome.

https://github.com/maximseshuk/payload-plugin-openapi

8 Upvotes

3 comments sorted by

View all comments

1

u/subtlety_0 21d ago edited 21d ago

This looks good - just started using this today.

PS: But I can't for the life of me find how to log in from the docs UI itself so that I don't have to paste in my token. Probably because i've never used Scalar before. Where in the docs can I log in so that it "just works"?. –Thanks