Conversation
fe64036 to
29c684e
Compare
There was a problem hiding this comment.
Pull request overview
This PR syncs the Subject Service’s OpenAPI schema (and regenerated server stubs/types) with updates from dotto-typespec, including removal of several legacy resources and introduction of new subject listing filters plus syllabus retrieval.
Changes:
- Updated
openapi/openapi.yaml(removed Courses/DayOfWeekTimetableSlots/SubjectCategories, added Subjects list filters, Subject upsert, and Syllabus endpoint; updated schemas). - Regenerated
generated/api.gen.goto match the new OpenAPI contract (new param binding, models, and routes). - Removed now-obsolete handlers/wiring for removed endpoints and updated server initialization/handler constructor accordingly.
Reviewed changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| openapi/openapi.yaml | Updates API contract: removes endpoints, adds required subject query filters, adds upsert + syllabus endpoint, updates schemas. |
| internal/handler/subject_category.go | Removes SubjectCategory handlers (endpoint removed from spec). |
| internal/handler/subject.go | Adapts subject list response shape; adds new handler stubs for upsert + syllabus. |
| internal/handler/handler.go | Removes unused service dependencies from Handler and NewHandler. |
| internal/handler/day_of_week_timetable_slot.go | Removes DayOfWeekTimetableSlot handlers (endpoint removed from spec). |
| internal/handler/course.go | Removes Course handlers (endpoint removed from spec). |
| internal/handler/converter.go | Updates Faculty mapping types; partially adapts Subject mapping to new schema (currently with TODO/placeholder values). |
| generated/api.gen.go | Regenerated API types/routes/strict wrapper per updated OpenAPI. |
| cmd/server/main.go | Removes initialization/wiring for removed repositories/services; updates handler construction. |
| .serena/project.yml | Adds Serena configuration keys for symbol info budget / language backend. |
Comments suppressed due to low confidence (2)
openapi/openapi.yaml:204
GET /v1/subjectsmarks all filter parameters (q,grade,courses,class,classification,semester,requirementType,culturalSubjectCategory) asrequired: true. This is a breaking change from the previous no-parameter list API and will cause requests without all parameters to be rejected by request validation. Please confirm this is intended; if these are optional filters, change them torequired: false(and update generation) or provide defaults.
get:
operationId: SubjectsV1_detail
description: 科目を詳細取得する
parameters:
- name: id
in: path
required: true
description: 科目ID
schema:
type: string
responses:
'200':
description: 科目の詳細
content:
application/json:
schema:
type: object
properties:
subject:
$ref: '#/components/schemas/Subject'
required:
- subject
tags:
- Subjects
delete:
operationId: SubjectsV1_delete
description: 科目を削除する
parameters:
- name: id
in: path
required: true
description: 科目ID
schema:
type: string
responses:
'204':
description: There is no content to send for this request, but the headers may be useful.
tags:
- Subjects
/v1/subjects/{id}/syllabus:
get:
operationId: SyllabusV1_detail
description: シラバスを取得する
parameters:
- name: id
in: path
required: true
description: 科目ID
schema:
type: string
responses:
'200':
description: シラバス
content:
application/json:
schema:
type: object
properties:
syllabus:
$ref: '#/components/schemas/Syllabus'
required:
- syllabus
tags:
- Syllabus
components:
schemas:
DottoFoundationV1.Class:
type: string
enum:
- A
- B
- C
- D
- E
- F
- G
openapi/openapi.yaml:228
- For
PUT /v1/subjectsthe operation is described as upsert (create or update), but the200response description still says "作成された科目" (created subject). Please update the response description to reflect both create and update outcomes to avoid confusing API consumers.
type: string
enum:
- AllYear
- H1
- H2
- Q1
- Q2
- Q3
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Copilotの指摘みるわ |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 10 out of 11 changed files in this pull request and generated 6 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
kantacky
left a comment
There was a problem hiding this comment.
一旦、レビューしたことにします
Copilotコメントの対応が完了したら、再レビュー依頼お願いします
|
Copilotの指摘は正しいのですが、次のPRで実装いたします。 |
This PR updates the OpenAPI schema from dotto-typespec.
Triggered by: fun-dotto/dotto-typespec@0d0bdb6