Skip to content

Update OpenAPI schema#32

Merged
kantacky merged 6 commits intomainfrom
update-openapi-schema
Mar 23, 2026
Merged

Update OpenAPI schema#32
kantacky merged 6 commits intomainfrom
update-openapi-schema

Conversation

@dotto-api-schema-updater
Copy link
Copy Markdown
Contributor

This PR updates the OpenAPI schema from dotto-typespec.

Triggered by: fun-dotto/dotto-typespec@50b5e77

@kantacky kantacky assigned kantacky and hikaru-0602 and unassigned kantacky Mar 19, 2026
@kantacky kantacky force-pushed the update-openapi-schema branch from bf94d04 to 53980bf Compare March 23, 2026 07:30
kantacky and others added 3 commits March 23, 2026 16:35
… 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 kantacky marked this pull request as ready for review March 23, 2026 07:36
@kantacky kantacky merged commit 1e0cfe4 into main Mar 23, 2026
6 checks passed
@kantacky kantacky deleted the update-openapi-schema branch March 23, 2026 07:38
@kantacky kantacky assigned kantacky and unassigned hikaru-0602 Mar 23, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 404 responses to the OpenAPI paths for announcement detail, update, and delete.
  • Updated handlers to map domain.ErrNotFound to 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.

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.

3 participants