Skip to content

Latest commit

 

History

History
30 lines (22 loc) · 646 Bytes

README.md

File metadata and controls

30 lines (22 loc) · 646 Bytes

@amboss/payload-3-openapi

A plugin for Payload CMS that generates OpenAPI documentation for your API endpoints.

Installation

pnpm add -D github:amboss-mededu/payload-3-openapi-tools

Usage

  1. Add the following script to your package.json:
{
    "scripts": {
        "generate:openapi-docs": "tsx node_modules/@amboss/payload-3-openapi/dist/create-api-docs/index.js $(pwd)/path/to/your/payload.config.ts"
    }
}
  1. Run the script to generate OpenAPI documentation:
pnpm generate:openapi-docs

This will generate OpenAPI documentation based on your Payload CMS configuration file.

License

MIT