Skip to content

Commit 98dfce0

Browse files
Flatten API reference into single file using pydoc-markdown
- Replace custom AST-based generator with pydoc-markdown library - Generate single sdk/api/index.mdx with all API documentation (7214 lines) - Remove 11 separate module MDX files (agent, conversation, llm, etc.) - Update docs.json to reference only sdk/api/index - Install pydoc-markdown in workflow for doc generation - Uses pydoc-markdown's native markdown output with Mintlify frontmatter - No external dependencies needed at runtime (pydoc-markdown installed in CI)
1 parent be9d886 commit 98dfce0

File tree

15 files changed

+7334
-2989
lines changed

15 files changed

+7334
-2989
lines changed

.github/scripts/generate_api_docs.py

Lines changed: 126 additions & 330 deletions
Large diffs are not rendered by default.

.github/workflows/sync-api-reference.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,10 @@ jobs:
5555
with:
5656
python-version: '3.11'
5757

58+
- name: Install pydoc-markdown
59+
run: |
60+
pip install pydoc-markdown
61+
5862
- name: Generate API documentation
5963
env:
6064
AGENT_SDK_PATH: ${{ github.workspace }}/agent-sdk

docs.json

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -265,18 +265,7 @@
265265
{
266266
"group": "API Reference",
267267
"pages": [
268-
"sdk/api/index",
269-
"sdk/api/agent",
270-
"sdk/api/conversation",
271-
"sdk/api/llm",
272-
"sdk/api/tool",
273-
"sdk/api/workspace",
274-
"sdk/api/mcp",
275-
"sdk/api/event",
276-
"sdk/api/context",
277-
"sdk/api/security",
278-
"sdk/api/io",
279-
"sdk/api/git"
268+
"sdk/api/index"
280269
]
281270
}
282271
]
@@ -447,4 +436,4 @@
447436
"destination": "/openhands/usage/troubleshooting/feedback"
448437
}
449438
]
450-
}
439+
}

sdk/api/agent.mdx

Lines changed: 0 additions & 95 deletions
This file was deleted.

sdk/api/context.mdx

Lines changed: 0 additions & 94 deletions
This file was deleted.

0 commit comments

Comments
 (0)