# OpenAPI

> EmDash CMS plugin that generates a collection-aware OpenAPI 3.1 document and serves Swagger UI and Scalar API references.

Source: https://emdashcmseverything.com/plugins/openapi/

- Category: Integrations
- Status: available
- Version: 0.1.1
- Price: Unknown
- Compatibility: EmDash >=1.0.0
- License: MIT
- Maintainer: yaamin
- Download: https://www.npmjs.com/package/emdash-plugin-openapi
- Repository: https://github.com/yaaamin/payload-openapi
- Published: 2026-11-01

EmDash CMS plugin that generates a collection-aware OpenAPI 3.1 document and serves Swagger UI and Scalar API references.

## Installation

Install the package from npm:

```bash
npm install emdash-plugin-openapi
```

Register the plugin in your Astro config:

```js
// astro.config.mjs
import { defineConfig } from "astro/config";
import emdash from "emdash/astro";
import { openapiPlugin } from "emdash-plugin-openapi";
import { openapiDocs } from "emdash-plugin-openapi/docs";

export default defineConfig({
  integrations: [
    emdash({
      // ...database, storage, etc.
      plugins: [openapiPlugin()],
    }),
    openapiDocs(), // optional: Scalar + Swagger UI at /api-docs
  ],
});
```

## Details

- **Latest version:** 0.1.1
- **License:** MIT
- **Publisher:** yaamin
- **Requires:** EmDash `>=1.0.0`
- **Source repository:** [https://github.com/yaaamin/payload-openapi](https://github.com/yaaamin/payload-openapi)
- **npm package:** [emdash-plugin-openapi](https://www.npmjs.com/package/emdash-plugin-openapi)
