バスAPIスキーマと BFF エンドポイントを追加#65
Open
kantacky wants to merge 4 commits into
Open
Conversation
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
bus-apiで定義されているBusTripsV1とBusTimetableStopsV1相当のGETエンドポイントを Admin BFFにも公開し、認証済み管理者がバス運行情報を参照できるようにした。
Contributor
There was a problem hiding this comment.
Pull request overview
Bus API(運行情報・停車情報)向けのTypeSpecスキーマを新規追加し、リポジトリのエントリーポイント(main.tsp)からコンパイル対象として取り込むPRです。
Changes:
src/bus-api/model.tspに BusTrip / BusTimetableStop などのモデル定義を追加src/bus-api/service.tspに/v1/busTripsと/v1/busTrips/{tripId}/busTimetableStopsのAPI定義を追加main.tspから Bus API の service 定義を import するよう更新
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/bus-api/service.tsp | Bus API のエンドポイント定義・server/metadata 追加 |
| src/bus-api/model.tsp | Bus API が返すデータモデル(運行・停車)追加 |
| main.tsp | Bus API スキーマをコンパイル対象に追加 |
バス運行情報・停車情報エンドポイントの土台として、BusStop・BusRoute・ BusTimetableStop・BusTrip・BusAlert を AppBFFService 名前空間に追加した。 このコミットではモデル追加のみで、エンドポイント定義は次のコミットで行う。
bus-apiで定義されているBusTripsV1とBusTimetableStopsV1相当のGETエンドポイントを App BFFにも公開し、アプリからバス運行情報を参照できるようにした。
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.
概要
バスの運行情報・停車情報を扱う TypeSpec スキーマを新規追加し、App BFF / Admin BFF の双方から利用するエンドポイントを定義する。
変更点
Bus API(新規)
src/bus-api/model.tspを追加し、BusStop/BusRoute/BusTimetableStop/BusTrip/BusAlertをBusService名前空間に定義。src/bus-api/service.tspを追加し、BusServiceのサーバー(Production / QA / Staging / Development / Local)と以下の API を定義。GET /v1/busTrips?date=...— 指定日のバス運行情報一覧GET /v1/busTrips/{tripId}/busTimetableStops— 指定運行の停車情報一覧main.tspに./src/bus-api/service.tspの import を追加。App BFF API
src/app-bff-api/model.tspにBusStop/BusRoute/BusTimetableStop/BusTrip/BusAlertを追加(AppBFFService名前空間)。src/app-bff-api/service.tspに App 向けBusTripsV1/BusTimetableStopsV1を追加し、UnauthorizedResponseを含めた応答型を定義。Admin BFF API
src/admin-bff-api/service.tspに Admin 向けBusTripsV1/BusTimetableStopsV1を追加。モデルはBusService.BusTrip/BusService.BusTimetableStopを再利用。確認内容
task compileで TypeSpec が問題なくコンパイルできる