chore(api): register MessageDto as a named OpenAPI component (#365) #368
No reviewers
Labels
No labels
area:auth
area:ci
area:db
area:infra
area:native
area:pwa
area:service
epic
feature
foundation
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
james/carol!368
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "365-name-messagedto-component"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
MessageDtoonly appears nested inConversationDetailDto.messages[]/TurnResponseDto.messages[], so the metadata-onlynamedDto(...)never surfaced it as a component — consumers had to derive it fromTurnResponseDto["messages"][number](seeagent-stream.ts, #344). Register it directly socomponents.schemas.MessageDtoexists.What's in it
openapi-routes.ts:registry.register("MessageDto", zMessageDto);(mirrors howProblemDetailsis registered); removed the deadvoid MessageDto. No zod-shape or route change.packages/api-client/src/agent-stream.ts: usescomponents["schemas"]["MessageDto"]instead of theTurnResponseDto["messages"][number]derivation.openapi.json+ api-client types regenerated.Verification
api typecheck✓ ·openapi:check✓ ·openapi:coverage119 (unchanged — no new path) ·api-client check✓ ·api-client typecheck✓ ·api-client test42 ·api test(SQLite leg) 1010 passed, no openapi-shape assertion brokeMerge note
This and #366 (conversation rename/delete) both regenerate
openapi.json+schema.d.ts. Whichever merges second should rebase and re-runopenapi:generate+ the api-clientgenerate— the generated files are deterministic, so it's a mechanical re-regen, not a hand-merge.Closes #365
🤖 Generated with Claude Code
MessageDto only appears nested in ConversationDetailDto.messages[] / TurnResponseDto.messages[], so the metadata-only namedDto(...) never surfaced it as a component — consumers had to derive it from TurnResponseDto["messages"][number]. Register it directly (like ProblemDetails) so components.schemas.MessageDto exists. - openapi-routes.ts: registry.register("MessageDto", zMessageDto); removed the dead `void MessageDto`. - packages/api-client/src/agent-stream.ts: use components["schemas"]["MessageDto"] instead of the derivation. - openapi.json + api-client types regenerated (both drift gates green; coverage unchanged at 119 — no new path). Closes #365 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>📊 Test coverage
Patch coverage: no testable lines changed.
Overall (
app/,lib/,db/, excluding UI per ADR-0019):Soft thresholds per ADR-0019. Coverage is informational and does not block merge.