announcement-apiを統合#13
Merged
Merged
Conversation
Announcement Serviceの実装
Add Announcement repository
…pository Revert 5 feature/announcement repository
…cement-repository Revert 8 revert 5 feature/announcement repository
モックリポジトリで動くようにした
sortできるようにした
* oapi-codegen/gin-middlewareをインストール * Add middleware * Dockerfileを編集し、openapi.yamlをコピーするようにした
* task install * devを一番上にして試す * Revert "devを一番上にして試す" This reverts commit 9ac24f10b4086ff942fb8db8564d3ad0c969dc8a. * Cloud SQLにつなぐ処理を実装した * Update cd.yaml
* Update mock repository * Update test * Update internal/handler/announcement_test.go Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Copilot のレビューを反映 * 文言を統一 * vilidate関数を追加 * いらないテストケースを削除 * 500エラーのテストを修正 * 不必要なヘルパー関数を削除 --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* contextを導入 * テストにも導入
* Update config * Generate * Update main.go * strict-server対応とtestの修正
* Update schema * Update test * Update and refactor * Fix compile errors
* Update DB model * Update domain model * Update convert function * Impl CRUD * Fix error handling * Refactor * Fix converter * Add gorm not null
* Update OpenAPI YAML * Generate * v0エンドポイントの削除とOpenAPIスキーマ変更に伴うハンドラー修正 v0関連の型・ハンドラーを削除し、Createレスポンスを201に変更、 新規のDetailエンドポイントハンドラーを追加した。 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * Update domain model * Remove v0 * Refactor * Update SQL query --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
* Update OpenAPI schema from dotto-typespec * Regenerate API code with 404 responses for detail, update, and delete endpoints Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Return 404 responses instead of errors when resource is not found Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Add tests for 404 responses on detail, update, and delete endpoints Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: kantacky <51151242+kantacky@users.noreply.github.com> Co-authored-by: Kanta Oikawa <iam@kantacky.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
fun-dotto/announcement-api のコミット履歴を git filter-repo で モジュラーモノリスのレイアウトへ再配置した上でマージする。 - internal/handler|domain|repository|service → internal/modules/announcement/ - cmd/server → cmd/announcement-api - openapi → api/openapi/announcement - generated → gen/announcement import パスや shared 化などの配線は後続コミットで対応する。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
履歴引き継ぎマージ後の announcement-api コードを server の規約に合わせて配線する。 - import パスを github.com/fun-dotto/server/... へ書き換え - repository を shared/model.Announcement ベースへ変更し、 domain(string ID) と model(uuid.UUID) の境界変換を repository/convert.go に集約 - 独自の internal/config・internal/database(接続/モデル/AutoMigrate)は廃止し、 shared/db と Atlas マイグレーション(既存 announcements テーブル)を再利用 - cmd/announcement-api を academic と同じ構成へ (shared db 接続・OpenAPI 仕様の埋め込み・graceful shutdown、AutoMigrate 廃止) - OpenAPI 仕様をバイナリ同梱するため internal/modules/announcement/openapispec を追加 - oapi-codegen の出力先を gen/announcement/api.gen.go へ変更 - テスト依存の testify を go.mod へ追加 go build ./... / go test ./... 通過済み。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
kantacky
reviewed
Jun 14, 2026
Member
There was a problem hiding this comment.
他のエントリーポイントと同じフォーマット?にちゃんとなってるのかな
Member
Author
There was a problem hiding this comment.
なってない気がする
今回の統合で対応するのがいいのかな
kantacky
reviewed
Jun 14, 2026
Comment on lines
+28
to
+37
| sortDateDirection := func() string { | ||
| switch query.SortByDate { | ||
| case domain.SortDirectionAsc: | ||
| return "ASC" | ||
| case domain.SortDirectionDesc: | ||
| return "DESC" | ||
| default: | ||
| return "ASC" | ||
| } | ||
| }() |
Member
Author
There was a problem hiding this comment.
これ前も悩んだな
どうします?
まあ、このPRでは変えなくてもいいかも
kantacky
reviewed
Jun 14, 2026
Member
There was a problem hiding this comment.
細かいけど、cmd/announcement/main.goにした方が良さそう
Member
Author
There was a problem hiding this comment.
cmd/academic-api/main.goになってるけど、それも変える?
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.
No description provided.