@devries-cameron20 / composio Mirror · read-only / commits / 5bbbd1917
Fork 0

Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

Mirrored from https://github.com/Camo67/composio.git

Synced Nov 22, 20:45 UTC

feat: update API docs generation process (#1983)

Himanshu Dixit committed Sep 24, 2025 at 14:36 UTC 5bbbd19174bd801a7b90c0866f6500e96d508f1d
6 files changed +28 -7
.gitignore
+1
@@ -47,6 +47,7 @@ fern/toolkits/*
47 !fern/tools/src/
48 !fern/tools/src/**
49 fern/apis/openapi.yml
50 +fern/apis/openapi.json
51 fern/apis/openapi-mcp.json
52 fern/pages/dist/
53 fern/pages/sdk/
README.md
+13
@@ -66,6 +66,19 @@ composio = Composio(
66
67 For more detailed usage instructions and examples, please refer to each SDK's specific documentation.
68
69 +### Open API Specification
70 +
71 +To update the OpenAPI specifications used for generating SDK documentation:
72 +
73 +```bash
74 +# Pull the latest API specifications from the backend
75 +pnpm api:pull
76 +```
77 +
78 +This command pulls the OpenAPI specification from `https://backend.composio.dev/api/v3/openapi.json` (defined in `fern/scripts/pull-openapi-spec.sh`) and updates the local API documentation files.
79 +
80 +This is pulled automatically with build step.
81 +
82 ## Available SDKs
83
84 ### TypeScript SDK (/ts)
fern/apis/openapi-overrides.yml
+9
@@ -2,6 +2,15 @@ paths:
2 /api/v3/mcp/validate/{uuid}:
3 get:
4 x-fern-ignore: true
5 + /api/v3/cli/get-session:
6 + get:
7 + x-fern-ignore: true
8 + /api/v3/cli/create-session:
9 + post:
10 + x-fern-ignore: true
11 + /api/v3/auth/session/logout:
12 + post:
13 + x-fern-ignore: true
14 components:
15 securitySchemes:
16 ApiKeyAuth:
fern/apis/v3/generators.yml
+1 -1
@@ -1,6 +1,6 @@
1 api:
2 specs:
3 - - openapi: ../openapi.yml
3 + - openapi: ../openapi.json
4 overrides: ../openapi-overrides.yml
5 settings:
6 title-as-schema-name: false
fern/scripts/pull-openapi-spec.sh
+2 -4
@@ -3,16 +3,14 @@
3 # Exit on any error
4 set -e
5
6 -# Define the OpenAPI specification URL and paths
7 -# OPENAPI_URL="https://hermes.composio.dev/openapi.json"
8 -OPENAPI_URL="https://app.stainless.com/api/spec/documented/composio-sdk/openapi.documented.yml"
6 +OPENAPI_URL="https://backend.composio.dev/api/v3/openapi.json"
7 OPENAPI_MCP_URL="https://mcp.composio.dev/openapi.json"
8
9 # Get the directory where the script is located, works in both CI and local environments
10 SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}" 2>/dev/null || dirname "$0")" && pwd)"
11 FERN_DIR="$(dirname "$SCRIPT_DIR")"
12 API_DIR="$FERN_DIR/apis"
15 -OUTPUT_FILE="$API_DIR/openapi.yml"
13 +OUTPUT_FILE="$API_DIR/openapi.json"
14 # OUTPUT_V3_FILE="$API_DIR/openapi-v3.json"
15 OUTPUT_MCP_FILE="$API_DIR/openapi-mcp.json"
16
fern/turbo.json
+2 -2
@@ -4,7 +4,7 @@
4 "tasks": {
5 "build": {
6 "dependsOn": ["api:pull", "add-og", "snippets:build", "tools:generate", "sdkdocs"],
7 - "outputs": ["apis/openapi.yml", "apis/openapi-mcp.json", "pages/dist/**", "tools/**"],
7 + "outputs": ["apis/openapi.json", "apis/openapi-mcp.json", "pages/dist/**", "tools/**"],
8 "cache": true
9 },
10
@@ -26,7 +26,7 @@
26 },
27
28 "api:pull": {
29 - "outputs": ["apis/openapi.yml", "apis/openapi-mcp.json"],
29 + "outputs": ["apis/openapi.json", "apis/openapi-mcp.json"],
30 "cache": true
31 },
32