Conversation
bf94d04 to
53980bf
Compare
… endpoints Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
kantacky
approved these changes
Mar 23, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR syncs the repository’s OpenAPI spec with the upstream dotto-typespec output, and updates the Go handlers + generated types to correctly return HTTP 404 for “announcement not found” cases.
Changes:
- Added
404responses to the OpenAPI paths for announcement detail, update, and delete. - Updated handlers to map
domain.ErrNotFoundto explicit*404Response{}return types (instead of returning the error). - Added handler tests asserting 404 behavior for detail/update/delete when the repository returns
domain.ErrNotFound.
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| openapi/openapi.yaml | Adds 404 responses for /v1/announcements/{id} operations to match updated schema. |
| internal/handler/get_announcement_v1.go | Returns AnnouncementsV1Detail404Response{} when service returns domain.ErrNotFound. |
| internal/handler/update_announcement.go | Returns AnnouncementsV1Update404Response{} when service returns domain.ErrNotFound. |
| internal/handler/delete_announcement.go | Returns AnnouncementsV1Delete404Response{} when service returns domain.ErrNotFound. |
| internal/handler/announcement_test.go | Adds tests validating 404 status codes for not-found scenarios. |
| generated/api.gen.go | Includes newly generated 404 response types and visitor methods that write status 404. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR updates the OpenAPI schema from dotto-typespec.
Triggered by: fun-dotto/dotto-typespec@50b5e77