Swagger
Swagger plugin for Payload CMS that generates OpenAPI documentation.
Installation
pnpm add payload-swagger About
Payload-swagger generates OpenAPI 3 documentation from your Payload configuration. It adds routes for serving the OpenAPI document and the Swagger UI interface, enabling users to explore API endpoints easily. The plugin leverages the payload-openapi package to document all available endpoints, including collection, global, custom, and authentication endpoints, while providing fully typed schema definitions for requests and responses. Users can extend the generated OpenAPI document with information from the package.json file or optionally from a .openapi config file. The plugin provides flexible configuration options to customize the Swagger UI routes, access level analysis on collections, and define custom endpoints. Users can also exclude certain parts of the configuration from being documented. Examples for custom endpoints can be incorporated directly into the Payload configuration, and documentation for custom routes can be added as well. This integration allows seamless documentation of complex Payload APIs alongside the core features of the CMS.
Package info
- Package name
payload-swagger- Latest version
1.4.0- Unpacked size
- 24 kB
- License
- MIT
- Weekly downloads
- 1.7k
- Last publish
- Jul 15, 2023
More from teunmooij
View profileSimilar plugins
More in DevtoolsOpenAPI
Autogenerate an OpenAPI specification from a Payload CMS instance and render it with Swagger UI, Redoc, RapiDoc, or Scalar.
Puck visual page builder
Integrate Puck visual page builder with Payload CMS for drag-and-drop editing.
Create Ideal CMS
Interactive CLI that scaffolds a production-ready Payload CMS monorepo preconfigured with FocusReactive plugins.
Dry Run
Test Payload create operations end-to-end without persisting, by rolling back the transaction after hooks and validation run.
OpenAPI
Generates OpenAPI specifications from Payload CMS configurations.
Repository
Wrapper around Payload's Local API providing repository operations.