Skip to content

Update OpenAPI schema#19

Merged
hikaru-0602 merged 4 commits intomainfrom
update-openapi-schema
Mar 27, 2026
Merged

Update OpenAPI schema#19
hikaru-0602 merged 4 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

@hikaru-0602 hikaru-0602 mentioned this pull request Mar 27, 2026
@hikaru-0602 hikaru-0602 marked this pull request as ready for review March 27, 2026 07:06
@hikaru-0602 hikaru-0602 requested review from a team, Copilot, hikaru-0602 and kantacky March 27, 2026 07:06
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.

これでいいよね?

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 syncs the repository’s OpenAPI contract and generated Go API bindings with the latest dotto-typespec changes, adding the PersonalCalendarItems endpoint and updating several query parameter shapes.

Changes:

  • Updated openapi.yaml (new /v1/personalCalendarItems, new TimetableSlot, and several query params renamed to plural array forms like semesters, grades, etc.).
  • Regenerated Go server/types (generated/api.gen.go) to match the updated OpenAPI contract.
  • Updated handler-side request conversion to use the new pluralized query params.

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.

File Description
openapi/openapi.yaml Updates the API contract (new endpoint, schema changes, query parameter shape changes).
generated/api.gen.go Regenerates Go types/routes/wrappers to reflect the updated OpenAPI schema.
internal/handler/converter.go Adapts subject list filtering to renamed/pluralized query params.
internal/handler/personal_calendar_item_list.go Adds the new strict handler method required by the regenerated interface.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

TimetableItem.slot is described as possibly being null ("時間割に含まれていない場合はnull") but the OpenAPI 3.1 schema does not allow null here (it’s just an object ref via allOf). This is a spec/codegen mismatch (clients/validators will reject null). Update the schema to explicitly allow null (e.g., anyOf with the slot ref and {type: 'null'}) or change the description/behavior to mean “field omitted when not applicable”.

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

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Member

@kantacky kantacky left a comment

Choose a reason for hiding this comment

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

LGTM

@hikaru-0602 hikaru-0602 merged commit 1ff76ca into main Mar 27, 2026
6 checks passed
@hikaru-0602 hikaru-0602 deleted the update-openapi-schema branch March 27, 2026 08:36
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.

4 participants