Conversation
There was a problem hiding this comment.
Pull request overview
This PR refreshes the Admin BFF and Academic Service OpenAPI schemas (and regenerated Go code) based on upstream dotto-typespec changes, including new endpoints and renamed query parameters.
Changes:
- Updated OpenAPI specs to add PersonalCalendarItems and rename several query parameters to pluralized forms (e.g.,
semester→semesters,grade→grades). - Added a new handler to proxy
GET /v1/personalCalendarItemsto the Academic API. - Regenerated Go API/client code and added handler tests to validate query parameter renames and the new proxy endpoint.
Reviewed changes
Copilot reviewed 5 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| openapi/openapi.yaml | Updates BFF OpenAPI schema (new tag/endpoint, pluralized query params, new schemas). |
| openapi/external/academic_api/openapi.yaml | Updates external Academic API OpenAPI schema (new endpoint, pluralized query params, new schemas). |
| internal/handler/subject.go | Adapts BFF subject handler to renamed/pluralized query parameters when proxying upstream. |
| internal/handler/personal_calendar_item.go | Adds proxy handler for PersonalCalendarItems list endpoint with auth gating. |
| internal/handler/handler_test.go | Adds tests for renamed query params and PersonalCalendarItems proxying. |
| generated/external/academic_api/client.gen.go | Regenerated upstream Academic API client/models for new schema. |
| generated/api.gen.go | Regenerated BFF server/types for updated schema and new endpoint. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| slot: | ||
| allOf: | ||
| - $ref: '#/components/schemas/DottoFoundationV1.TimetableSlot' | ||
| description: 集中講義など、時間割に含まれていない場合はnull | ||
| rooms: |
There was a problem hiding this comment.
slot is documented as possibly null ("時間割に含まれていない場合はnull") but the schema only allows a DottoFoundationV1.TimetableSlot object via allOf. In OpenAPI 3.1 this mismatch can break client generation/validation. Model this as nullable using JSON Schema (e.g., anyOf with {type: 'null'}) or otherwise align the description with the actual response behavior (omit vs null).
| allOf: | ||
| - $ref: '#/components/schemas/DottoFoundationV1.TimetableSlot' |
There was a problem hiding this comment.
slot is described as potentially null ("時間割に含まれていない場合はnull") but the schema only allows an object (allOf -> DottoFoundationV1.TimetableSlot). In OpenAPI 3.1, represent nullability explicitly with JSON Schema (e.g., anyOf: [{$ref: ...}, {type: 'null'}]) or adjust the description if the field is only omitted (not null).
| allOf: | |
| - $ref: '#/components/schemas/DottoFoundationV1.TimetableSlot' | |
| anyOf: | |
| - $ref: '#/components/schemas/DottoFoundationV1.TimetableSlot' | |
| - type: 'null' |
This PR updates the OpenAPI schema from dotto-typespec.
Triggered by: fun-dotto/dotto-typespec@1ed56ee