Skip to content

バスAPIスキーマと BFF エンドポイントを追加#65

Open
kantacky wants to merge 4 commits into
mainfrom
add-bus-api
Open

バスAPIスキーマと BFF エンドポイントを追加#65
kantacky wants to merge 4 commits into
mainfrom
add-bus-api

Conversation

@kantacky

@kantacky kantacky commented May 9, 2026

Copy link
Copy Markdown
Member

概要

バスの運行情報・停車情報を扱う TypeSpec スキーマを新規追加し、App BFF / Admin BFF の双方から利用するエンドポイントを定義する。

変更点

Bus API(新規)

  • src/bus-api/model.tsp を追加し、BusStop / BusRoute / BusTimetableStop / BusTrip / BusAlertBusService 名前空間に定義。
  • 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.tspBusStop / 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 が問題なくコンパイルできる
  • 生成される OpenAPI 定義に Bus 関連のパス・スキーマが期待通り含まれている

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
bus-apiで定義されているBusTripsV1とBusTimetableStopsV1相当のGETエンドポイントを
Admin BFFにも公開し、認証済み管理者がバス運行情報を参照できるようにした。

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 スキーマをコンパイル対象に追加

kantacky added 2 commits May 9, 2026 14:37
バス運行情報・停車情報エンドポイントの土台として、BusStop・BusRoute・
BusTimetableStop・BusTrip・BusAlert を AppBFFService 名前空間に追加した。
このコミットではモデル追加のみで、エンドポイント定義は次のコミットで行う。
bus-apiで定義されているBusTripsV1とBusTimetableStopsV1相当のGETエンドポイントを
App BFFにも公開し、アプリからバス運行情報を参照できるようにした。
@kantacky kantacky self-assigned this May 9, 2026
@kantacky kantacky changed the title Bus APIスキーマを追加 バスAPIスキーマと BFF エンドポイントを追加 May 9, 2026
@kantacky kantacky marked this pull request as draft May 9, 2026 05:39
@kantacky kantacky requested a review from Copilot May 9, 2026 05:39
@kantacky kantacky marked this pull request as ready for review May 9, 2026 05:39

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Comment thread src/bus-api/model.tsp
Comment thread src/app-bff-api/model.tsp
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.

2 participants