Skip to content

docs(openapi): enhance OpenAPI docs for session and system endpoints#5028

Draft
akshay-kumar-bm wants to merge 6 commits intogoogle:mainfrom
akshay-kumar-bm:docs/openapi-session-system-docs
Draft

docs(openapi): enhance OpenAPI docs for session and system endpoints#5028
akshay-kumar-bm wants to merge 6 commits intogoogle:mainfrom
akshay-kumar-bm:docs/openapi-session-system-docs

Conversation

@akshay-kumar-bm
Copy link
Copy Markdown

@akshay-kumar-bm akshay-kumar-bm commented Mar 27, 2026

Description

This PR improves the generated OpenAPI documentation for the ADK Web Server API by adding clearer endpoint metadata and richer schema docs (descriptions + examples) for session- and run-related request/response models.

What changed

  • Add Field(...) descriptions/examples to request models used by the web server API (e.g., RunAgentRequest, CreateSessionRequest, UpdateSessionRequest) in src/google/adk/cli/adk_web_server.py.
  • Add API metadata for selected endpoints (e.g., summary, response_description, responses, and more detailed docstrings), including system endpoints like /health and a debug endpoint for event graphs.
  • Add Field(...) descriptions/examples for the core Session model in src/google/adk/sessions/session.py.

Why
The OpenAPI output was technically correct but lacked enough context (field meanings, examples, and expected error cases) for consumers using Swagger UI / generated clients.

Issue

  • Closes: N/A
  • Related: N/A

Testing

Documentation-only change (OpenAPI metadata / schema docs).

  • Unit tests: Not run.
  • Manual check: Verify OpenAPI output renders as expected (e.g., view Swagger UI and confirm field descriptions/examples appear for session and run endpoints).

Checklist

  • Read CONTRIBUTING.md.
  • Self-reviewed the change.
  • Added/updated unit tests (not applicable for doc-only change).
  • Ran unit tests locally (not run for doc-only change).

@google-cla
Copy link
Copy Markdown

google-cla bot commented Mar 27, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@adk-bot adk-bot added the documentation [Component] This issue is related to documentation, it will be transferred to adk-docs label Mar 27, 2026
@adk-bot
Copy link
Copy Markdown
Collaborator

adk-bot commented Mar 27, 2026

Response from ADK Triaging Agent

Hello @akshay-kumar-bm, thank you for your contribution!

To help reviewers better understand the improvements to the OpenAPI documentation, could you please provide a screenshot of the generated docs after your changes have been applied?

This will help to verify the visual and descriptive enhancements you've made. Thanks!

@akshay-kumar-bm akshay-kumar-bm marked this pull request as draft March 27, 2026 17:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation [Component] This issue is related to documentation, it will be transferred to adk-docs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants