API documentation tools for Payload CMS 2

OpenAPI 3 generators for the Payload CMS REST API, with JSON-LD helpers for frontend pages and an audit that finds data anyone can read.

Command-line generator that writes an OpenAPI 3 document

Generates OpenAPI 3.0 documents for the REST endpoints of a Payload project

About these packages

API documentation tools generate an OpenAPI 3 document for your Payload REST endpoints. Swagger UI, Redoc and client generators can all read it. This category also holds Schema.org JSON-LD helpers and an audit for publicly readable data.

What these tools cover

  • OpenAPI, a generator for OpenAPI 3.0 documents of REST endpoints
  • Create API Docs, an OpenAPI 3 generator also listed among CLI tools
  • Specs you can load into Swagger UI, Redoc or a client generator
  • SEO JSON-LD helpers for product, breadcrumb and item list pages
  • Security, an audit that probes for data readable without login

Choosing API documentation tools

OpenAPI and Create API Docs are standalone generators. Check the supported Payload version on their cards and test them against your project before you rely on them. The OpenAPI plugins among the developer plugins build the spec inside your app instead and can serve it with Swagger UI or Scalar. Whichever you use, regenerate the spec when collections change, so it does not drift from the API. Run Security against a staging site to see which data anyone can read without logging in.

Frequently asked questions

Does Payload CMS generate OpenAPI docs on its own?

No. Payload generates TypeScript types and a GraphQL schema, but no OpenAPI spec for its REST API. Use a generator from this category or an OpenAPI plugin from the developer plugins.

Do these OpenAPI generators work with my Payload version?

Check the supported Payload version on their cards first, because both are older standalone packages. The OpenAPI plugins among the developer plugins read your config inside the app, so they follow your Payload setup.

Can I generate an API client from the spec?

Yes. Any OpenAPI client generator can read it. For TypeScript projects the official Payload SDK is often simpler, because it already knows Payload's REST API.