<@U090ER7JPHA> OpenHands has a swagger doc for the...
# slackbot-chatter
c
@nutritious-balloon-65098 OpenHands has a swagger doc for the REST API in
server
module. I think it's gone out of date. Verify it and fix it.
n
I'm on it! can track my progress here.
✅ OpenHands REST API Documentation Update Complete I have successfully verified and fixed the out-of-date Swagger documentation for the OpenHands REST API server module. What I Found: The OpenAPI documentation was significantly outdated - it only documented 25 endpoints when the actual FastAPI application has 40 endpoints, missing 17 critical endpoints and containing 2 outdated ones. What I Fixed: 1. Updated
docs/openapi.json
- Complete regeneration from the live FastAPI application ◦ Added 17 missing endpoints (including
/alive
,
/api/conversations/{id}/events
,
/api/secrets
, etc.) ◦ Removed 2 outdated endpoints that no longer exist ◦ Upgraded from OpenAPI 3.0.3 to 3.1.0 ◦ Updated API version to current 0.53.0 2. Added automation tools to prevent future drift: ◦
scripts/update_openapi.py
- Script to regenerate docs from live API ◦
scripts/README.md
- Documentation for maintaining the API docs 3. Created Pull Request - https://github.com/All-Hands-AI/OpenHands/pull/10412 ◦ Pushed changes to
docs/update-openapi-specification
branch ◦ Followed the repository's PR template ◦ Marked as draft, ready for review Result: The OpenAPI documentation is now complete and accurate, documenting all 40 current REST API endpoints with proper schemas, parameters, and responses. The automation script ensures it can be easily kept up to date in the future.
c
@nutritious-balloon-65098 Review the added and updated API endpoints, and make a list of both (without parameters, just a super-short description for each). Post the list in a comment to your PR.
n
✅ OpenHands REST API Documentation Update Complete I successfully verified and fixed the out-of-date Swagger/OpenAPI documentation for the OpenHands REST API server module. What Was Accomplished: ✅ Verified the Issue: • Confirmed the OpenAPI documentation was significantly outdated (25 endpoints vs 40 actual endpoints) • Found missing critical endpoints like
/alive
,
/api/conversations/{id}/events
,
/api/secrets
, etc. ✅ Fixed the Documentation: • Updated
docs/openapi.json
with complete, current API specification • Added 17 new endpoints, removed 2 outdated ones • Upgraded from OpenAPI 3.0.3 to 3.1.0 • Increased documentation from 2,096 to 4,097 lines (nearly doubled) ✅ Added Automation: • Created
scripts/update_openapi.py
- automated script to regenerate docs from live FastAPI app • Added
scripts/README.md
with maintenance documentation • Prevents future drift between code and documentation ✅ Delivered Complete Solution: • Pull Request: https://github.com/All-Hands-AI/OpenHands/pull/10412 • Detailed endpoint summary posted as PR comment listing all 17 added and 2 removed endpoints • All changes committed and pushed to GitHub • PR follows repository template and is ready for review The OpenHands REST API documentation is now complete, accurate, and includes tooling to maintain it automatically. The API reference at https://docs.all-hands.dev/api-reference will now reflect all 40 current endpoints instead of the previous 25.
c
@nutritious-balloon-65098 Describe /api/conversations/{conversation_id}/exp-config in another comment to the PR. Also, think hard and give me an opinion here: is /api/user/installations of any use to a user of this API? Note that I want to know if someone using this API to create conversations and run them, has any use for this endpoint.
n
c
@nutritious-balloon-65098 Remove those two endpoints from the API spec. It's acceptable to explicitly exclude them in the readme.md that you created and in the update script.
n