Skip to content

docs: add OpenAPI examples for analysis endpoints#920

Open
Neelr1912 wants to merge 2 commits into
imDarshanGK:mainfrom
Neelr1912:feat/openapi-examples-analysis-endpoints
Open

docs: add OpenAPI examples for analysis endpoints#920
Neelr1912 wants to merge 2 commits into
imDarshanGK:mainfrom
Neelr1912:feat/openapi-examples-analysis-endpoints

Conversation

@Neelr1912
Copy link
Copy Markdown

Description

This PR adds OpenAPI request and response examples for the analysis endpoints to improve the Swagger UI experience and make it easier for users to test APIs using the "Try it out" feature.

Changes Made

  • Added request examples for:

    • /explanation/
    • /debugging/
    • /suggestions/
    • /analyze/
  • Added response examples using Pydantic schema metadata.

  • Added FastAPI Body(..., examples=...) support for request payloads.

  • Ensured examples are included in the generated OpenAPI schema.

  • Added tests to validate that request and response examples are present in /openapi.json.

Related Issue

Fixes #205

Type of Change

  • Documentation update
  • Test addition

Testing

  • Verified OpenAPI examples appear in Swagger UI (/docs).
  • Added automated tests for OpenAPI examples.
  • Confirmed no endpoint behavior or business logic was changed.

Notes

Any remaining failing tests are pre-existing repository issues and are unrelated to this PR.

@Neelr1912 Neelr1912 requested a review from imDarshanGK as a code owner June 7, 2026 10:52
@Neelr1912
Copy link
Copy Markdown
Author

Implemented OpenAPI request and response examples for:

/explanation/
/debugging/
/suggestions/
/analyze/

Also added tests to verify examples are present in the generated OpenAPI schema.

Fixes #205.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add OpenAPI examples for analysis endpoints

1 participant