Skip to content

docs(core): fix UseCase docstring example to use output DTO#932

Merged
Kohei-Wada merged 1 commit into
mainfrom
docs/usecase-docstring-877
May 31, 2026
Merged

docs(core): fix UseCase docstring example to use output DTO#932
Kohei-Wada merged 1 commit into
mainfrom
docs/usecase-docstring-877

Conversation

@Kohei-Wada
Copy link
Copy Markdown
Owner

Summary

The docstring example in the UseCase base class showed UseCase[..., Task] returning a Task entity, but every concrete use case returns an output DTO (TaskOperationOutput, TaskUpdateOutput, StatusChangeOutput, etc.). This was a leftover from an earlier refactor (entities → output DTOs) and could mislead new contributors into breaking the controller-layer contract.

Updated the example to match the current DTO-return convention.

Test plan

  • Docstring-only change; pre-commit (ruff, mypy, codespell) and pre-push tests pass.

Closes #877

The example showed UseCase[..., Task] returning a Task entity, but every
concrete use case returns an output DTO (TaskOperationOutput, etc.).
Update the example to match the DTO-return convention.

Closes #877
Copy link
Copy Markdown

@amazon-q-developer amazon-q-developer Bot left a comment

Choose a reason for hiding this comment

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

The docstring update correctly aligns the example with the current DTO-return convention used throughout the codebase. The changes are accurate and improve documentation clarity for contributors.


You can now have the agent implement changes and create commits directly on your pull request's source branch. Simply comment with /q followed by your request in natural language to ask the agent to make changes.

@Kohei-Wada Kohei-Wada merged commit 210710d into main May 31, 2026
15 checks passed
@Kohei-Wada Kohei-Wada deleted the docs/usecase-docstring-877 branch May 31, 2026 04:17
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.

docs(core): UseCase base class docstring example shows outdated return type

1 participant