Skip to content

docs(openapi): improve docs for session model and default session endpoints - #5031

Closed
akshay-kumar-bm wants to merge 2 commits into
google:mainfrom
akshay-kumar-bm:docs/openapi-session-endpoint-docs-update
Closed

akshay-kumar-bm wants to merge 2 commits into
google:mainfrom
akshay-kumar-bm:docs/openapi-session-endpoint-docs-update

Conversation

@akshay-kumar-bm

Copy link
Copy Markdown
Contributor

Description

This PR improves the generated OpenAPI/Swagger documentation for session
management by adding clearer endpoint metadata and richer schema docs
(descriptions + examples).

What changed

  • Session model docs: add field descriptions/examples for Session so the API
    schema is self-explanatory.
  • Default session endpoints: improve OpenAPI docs for the built-in session
    management routes (create/get/list/update/delete sessions + events/artifacts
    where applicable) so request/response shapes and common errors are clearer.
  • System endpoints: enhance docs for basic endpoints like /health, / version,
    and /list-apps (where present in this server), including clearer summaries
    and error notes.

Why

The OpenAPI output was correct but lacked enough context (field meanings,
examples, and expected error cases) for users reading Swagger UI or generating
clients.

Testing

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

  • Unit tests: Not run.
  • Manual check: Confirm Swagger UI shows the new descriptions/examples for
    session-related schemas and endpoints.

Notes

  • Includes an empty commit (chore: rerun CI) to re-trigger GitHub Actions
    without changing code.

Checklist

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

@akshay-kumar-bm

Copy link
Copy Markdown
Contributor Author

Here some screenshort compare origin and updateing doc

image image image

@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
@rohityan rohityan self-assigned this Mar 30, 2026
@rohityan rohityan added web [Component] This issue will be transferred to adk-web and removed web [Component] This issue will be transferred to adk-web labels Mar 30, 2026
Comment thread src/google/adk/cli/adk_web_server.py Outdated
@@ -1076,10 +1215,47 @@ async def get_session_trace(session_id: str) -> Any:
@app.get(
"/apps/{app_name}/users/{user_id}/sessions/{session_id}",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

having a tags=["Sessions"] would be helpful.

@rohityan

Copy link
Copy Markdown
Collaborator

Hi @akshay-kumar-bm , Thank you for your contribution! We appreciate you taking the time to submit this pull request. Please fix formatting errors by running autoformat.sh. Also please address the review comments.

@rohityan rohityan added the request clarification [Status] The maintainer need clarification or more information from the author label Mar 30, 2026
@akshay-kumar-bm

Copy link
Copy Markdown
Contributor Author

Thanks for the feedback and for taking the time to review this PR @rohityan . I added Sessions tag as suggested, and also added Artifacts, Memory, and Agent Runs tags for better endpoint grouping. I ran autoformat.sh and pushed the updates. Please review when you get a chance.

@akshay-kumar-bm

akshay-kumar-bm commented Apr 1, 2026 •

Copy link
Copy Markdown
Contributor Author

Here screenshot few screenshort
image
image

@akshay-kumar-bm

Copy link
Copy Markdown
Contributor Author

Hi @rohityan — just checking in on this. I addressed the tags=["Sessions"] feedback and ran autoformat.sh back on April 1. Happy to make any additional changes if needed. Thanks!

@akshay-kumar-bm
akshay-kumar-bm force-pushed the docs/openapi-session-endpoint-docs-update branch from 8f28af0 to 311869f Compare May 16, 2026 13:25
@akshay-kumar-bm
akshay-kumar-bm force-pushed the docs/openapi-session-endpoint-docs-update branch from 311869f to 04ea27e Compare May 21, 2026 05:40
@DeanChensj DeanChensj assigned DeanChensj and unassigned rohityan Jun 15, 2026
copybara-service Bot pushed a commit that referenced this pull request Jun 16, 2026
Merge #5031

### Description

  This PR improves the generated OpenAPI/Swagger documentation for session
  management by adding clearer metadata and richer schema docs for the Session model
  (descriptions + examples).

  ### What changed

  - Session model docs: add field descriptions/examples for  so the API
    schema is self-explanatory.

  ### Why

  The OpenAPI output was correct but lacked enough context (field meanings
  and examples) for users reading Swagger UI or generating clients.

  ### Testing

  Documentation-only change (OpenAPI metadata / schema docs).
  - Unit tests: Not run.

Co-authored-by: Shangjie Chen <deanchen@google.com>
COPYBARA_INTEGRATE_REVIEW=#5031 from akshay-kumar-bm:docs/openapi-session-endpoint-docs-update 04ea27e
PiperOrigin-RevId: 932788042
@adk-bot

adk-bot commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator

Thank you @akshay-kumar-bm for your contribution! 🎉

Your changes have been successfully imported and merged via Copybara in commit 7a11b50.

Closing this PR as the changes are now in the main branch.

@adk-bot adk-bot added the merged [Status] This PR is merged label Jun 16, 2026
@adk-bot adk-bot closed this Jun 16, 2026
FrigaZzz pushed a commit to FrigaZzz/adk-python that referenced this pull request Aug 11, 2026
Merge google#5031

### Description

  This PR improves the generated OpenAPI/Swagger documentation for session
  management by adding clearer metadata and richer schema docs for the Session model
  (descriptions + examples).

  ### What changed

  - Session model docs: add field descriptions/examples for  so the API
    schema is self-explanatory.

  ### Why

  The OpenAPI output was correct but lacked enough context (field meanings
  and examples) for users reading Swagger UI or generating clients.

  ### Testing

  Documentation-only change (OpenAPI metadata / schema docs).
  - Unit tests: Not run.

Co-authored-by: Shangjie Chen <deanchen@google.com>
COPYBARA_INTEGRATE_REVIEW=google#5031 from akshay-kumar-bm:docs/openapi-session-endpoint-docs-update 04ea27e
PiperOrigin-RevId: 932788042
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 merged [Status] This PR is merged request clarification [Status] The maintainer need clarification or more information from the author

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants