docs/scripts/README.md
Fetches the Composio OpenAPI spec and filters it for use in Fumadocs API reference documentation.
bun run scripts/fetch-openapi.mjs
This outputs public/openapi.json which is used by lib/openapi.ts.
The raw OpenAPI spec from https://backend.composio.dev/api/v3/openapi.json has issues that break documentation generators:
See OPENAPI_IMPROVEMENTS.md in the fumadocs root for planned fixes to the spec itself.
These endpoints are completely removed:
/api/v3/mcp/validate/{uuid}/api/v3/cli/get-session/api/v3/cli/create-session/api/v3/auth/session/logoutEndpoints with only these tags are removed:
CLIAdminProfilingIf an endpoint has multiple tags, only the first tag is kept. This prevents the same endpoint appearing in multiple sidebar sections.
The script uses environment variables:
| Variable | Default | Description |
|---|---|---|
OPENAPI_SPEC_URL | https://backend.composio.dev/api/v3/openapi.json | Source OpenAPI spec URL |
For staging deployments, set:
OPENAPI_SPEC_URL=https://staging.composio.dev/api/v3/openapi.json