openapi-exporter
Yaak plugin: export current Workspace or Folder as OpenAPI JSON.
Features
- Export from
Workspace context menu
- Export from
Folder context menu (includes subfolders)
- Resolve URL templates with current environment values before generating path
- Use latest request response history (if available) to build OpenAPI
responses
- status code from latest response
- content-type from response headers
- response body example from
bodyPath (when readable and text-based)
- Preserve Chinese file names and sanitize invalid filename characters
- Save flow supports creating new files (choose directory + input filename)
Requirements
- Yaak version with plugin APIs from
@yaakapp/api >= 0.8.x
- Node.js (for plugin build/dev)
Install & Run
npm install
npm run dev
Build:
npm run build
Usage
- In Yaak sidebar, right-click a
Workspace or Folder.
- Click:
Export OpenAPI (JSON) for workspace
Export Folder OpenAPI (JSON) for folder
- In export dialog:
- Select output directory
- Input file name (auto appends
.json if missing)
- Plugin writes file and also copies generated JSON to clipboard.
Output Notes
- OpenAPI version:
3.1.0
- Adds metadata:
x-yaak-export.requestCount
x-yaak-export.responseBackedOperationCount
x-yaak-export.duplicatePathMethodCount
- If duplicate
path + method exists, only first one is kept.
Limitations
- If a request has no response history, exporter falls back to a default
200 response.
- Binary response bodies are not embedded as examples.