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
- 2.1k
- Last publish
- Jul 15, 2023
More from teunmooij
View profileOpenAPI
Generates OpenAPI specifications from Payload CMS configurations.
GraphQL View
Adds a GraphQL view with IDE support to Payload collections and globals.
Query
Type-safe query filters and field selection for Payload, with a REST select parameter plugin.
create api docs
Generate OpenAPI 3 documentation for Payload CMS.
OpenAPI
Generate OpenAPI 3 documentation for Payload CMS endpoints.
REST Client
A typesafe REST API client for Payload CMS.