Skip to content

Improve Swagger documentation for task endpoints - #8

Open
RodrigoOBC wants to merge 2 commits into
mongodb-developer:mainfrom
RodrigoOBC:doc/0001-doc-swagger
Open

RodrigoOBC wants to merge 2 commits into
mongodb-developer:mainfrom
RodrigoOBC:doc/0001-doc-swagger

Conversation

@RodrigoOBC

Copy link
Copy Markdown

This change improves the interactive API documentation by clarifying the parameters, fields, examples, and responses for each task endpoint.

  • Adds an API title, description, and version.
  • Documents all five task endpoints, including request examples, responses, and errors.
  • Clarifies the behavior of the _id, name, and completed fields.
  • Documents the 100-task list limit and partial update behavior.
  • Adds OpenAPI and HTTP tests using a mocked database.
  • Updates the README and adds the new tests to CI.

Known issue
Deleting an existing task may return 500 after removing it instead of the intended 204 response. This behavior is documented but not fixed by this change.
Testing

  • OpenAPI and HTTP tests with a mocked database: passed.
  • Runtime test: passed.
  • Integration tests: skipped because MongoDB was unavailable.

- Update FastAPI app initialization with title, description, and version.
- Add OpenAPI schema and HTTP behavior tests without MongoDB dependency.
- Modify task models to include detailed descriptions and examples.
- Improve task router with enhanced response descriptions and validation.
- Update CI workflow to include API documentation tests.
@RodrigoOBC
RodrigoOBC requested a review from a team as a code owner November 30, 2026 14:29
@sis0k0

sis0k0 commented Dec 2, 2026

Copy link
Copy Markdown
Member

Hi @RodrigoOBC! Thank you for the contribution! Could you please rewrite the PR to use examples in English, so we can keep this repo in line with the rest of our examples?

Translate Swagger/OpenAPI summaries, descriptions, response examples, and model field documentation from Portuguese to English. Update API docs tests to match the translated contract.
@RodrigoOBC

Copy link
Copy Markdown
Author

Hi @RodrigoOBC! Thank you for the contribution! Could you please rewrite the PR to use examples in English, so we can keep this repo in line with the rest of our examples?

Thank you for the feedback! I've rewritten the examples in English to match the rest of the repository. Please let me know if any further changes are needed.

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.

2 participants