Skip to content

Update OpenAPI schema#20

Merged
kantacky merged 5 commits intomainfrom
update-openapi-schema
Mar 27, 2026
Merged

Update OpenAPI schema#20
kantacky merged 5 commits intomainfrom
update-openapi-schema

Conversation

@dotto-api-schema-updater
Copy link
Copy Markdown
Contributor

This PR updates the OpenAPI schema from dotto-typespec.

Triggered by: fun-dotto/dotto-typespec@1ed56ee

@kantacky kantacky self-assigned this Mar 25, 2026
@kantacky kantacky marked this pull request as ready for review March 27, 2026 04:41
Copy link
Copy Markdown
Contributor

@hikaru-0602 hikaru-0602 left a comment

Choose a reason for hiding this comment

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

OK

@kantacky kantacky merged commit 1b3987e into main Mar 27, 2026
5 checks passed
@kantacky kantacky deleted the update-openapi-schema branch March 27, 2026 04:55
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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., semestersemesters, gradegrades).
  • Added a new handler to proxy GET /v1/personalCalendarItems to 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.

Comment on lines +1107 to +1111
slot:
allOf:
- $ref: '#/components/schemas/DottoFoundationV1.TimetableSlot'
description: 集中講義など、時間割に含まれていない場合はnull
rooms:
Copy link

Copilot AI Mar 27, 2026

Choose a reason for hiding this comment

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

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).

Copilot uses AI. Check for mistakes.
Comment on lines +1213 to +1214
allOf:
- $ref: '#/components/schemas/DottoFoundationV1.TimetableSlot'
Copy link

Copilot AI Mar 27, 2026

Choose a reason for hiding this comment

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

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).

Suggested change
allOf:
- $ref: '#/components/schemas/DottoFoundationV1.TimetableSlot'
anyOf:
- $ref: '#/components/schemas/DottoFoundationV1.TimetableSlot'
- type: 'null'

Copilot uses AI. Check for mistakes.
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.

3 participants