履修登録画面用の集約エンドポイント RegistrableSubjectsV1 を追加 - #70
Open
zakiPoteto wants to merge 2 commits into
Open
zakiPoteto wants to merge 2 commits into
zakiPoteto wants to merge 2 commits into
Conversation
科目検索・登録済み判定・時間割の3エンドポイントをアプリ側でクライアント集約している既存実装(search_subject_reducer.dart)の代替として、academic-api/app-bff-apiにRegistrableSubjectsV1.listを追加する。PersonalCalendarItemsV1と同じパターン(server側で複数リポジトリを集約し1回のレスポンスで返す)を踏襲。 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ESKebxSqfazc45RBCJCGVh
科目検索画面は未ログインでも使える既存仕様のため、この専用エンドポイントも それを維持する。userIdを必須パラメータから任意に変更し、Bearer認証も必須で はなくす。userId/Bearerが無い場合はisRegisteredを全科目falseで返す (slotsは認証状態によらず常に計算)。 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018TpGeornAqcXew3fPTb6A6
zakiPoteto
requested review from
a team,
Hosoda-abo,
kantacky,
masaya-osuga,
sayo-o518,
suzukimifuyu,
takuyone68 and
tanakarinna
September 9, 2026 03:52
4 tasks
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.
背景
PR #67 のレビューで @kantacky さんから、科目登録・検索画面がアプリ側で複数エンドポイント(
/v1/subjects+/v1/courseRegistrations+/v1/timetableItems)を叩いてクライアント側でaggregateしている実装への指摘があった(コメント)。その対応として、汎用モデル(
SubjectSummary)に機能を継ぎ足すのではなく、用途専用のエンドポイントを新設する方針で実装した。やったこと
academic-api/app-bff-api両方にRegistrableSubject { subject; isRegistered; slots }モデルを追加GET /v1/registrableSubjectsを新設。/v1/subjectsと同等のフィルタ(q, grades, courses, classes, classifications, year, semesters, requirementTypes, culturalSubjectCategories)に加えて、各科目の履修登録済みかどうか(isRegistered)と時間割上のコマ(slots)を返すacademic-api側のuserIdは必須→任意に変更。指定しない場合isRegisteredは全科目falseapp-bff-api側はBearer認証を必須にせず、FirebaseAppCheckAuthのみで呼び出せるようにした(BearerトークンがあればisRegisteredをそのユーザー基準で計算)slotsは認証状態に関わらず常に計算する(timetable_itemsはユーザーに紐づかないデータのため)Test plan
tsp compile .が成功することを確認server側の実装は別PRで対応関連
RegistrableSubject.subjectはSubject/SubjectSummaryをそのまま使うため、#67がマージされればrequirementsも自動的に含まれる)