Conversation
There was a problem hiding this comment.
Pull request overview
This PR introduces an initial OpenAPI schema for the “Subject Service” and adds Go server/models generated from that schema, along with module updates to support OpenAPI code generation and validation.
Changes:
- Added
openapi/openapi.yamldefining v1 endpoints and component schemas (Courses, Faculties, Subjects, etc.). - Added generated Gin server + models code (
generated/api.gen.go) viaoapi-codegen. - Updated
go.mod/go.sumto include tooling and transitive dependencies needed for generation/processing.
Reviewed changes
Copilot reviewed 2 out of 4 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| openapi/openapi.yaml | Adds the OpenAPI 3.1 spec (paths + schemas) for the Subject Service. |
| generated/api.gen.go | Adds Go types and Gin handler wrappers generated from the OpenAPI spec. |
| go.mod | Adds indirect dependencies and a tool entry for oapi-codegen. |
| go.sum | Updates module checksums for newly added dependencies. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| class: | ||
| allOf: | ||
| - $ref: '#/components/schemas/DottoFoundationV1.Class' | ||
| description: 修士課程・博士課程対象の場合はnull |
There was a problem hiding this comment.
SubjectTargetClass.class is documented as "null" for some cases, but the schema does not permit null (it’s an allOf string ref only). Because the server uses middleware.OapiRequestValidator, requests/responses with an explicit JSON null will fail validation. Either update the schema to allow null (e.g., union with null in OAS 3.1 / JSON Schema) or change the description/contract to indicate the field is omitted instead of null.
| description: 修士課程・博士課程対象の場合はnull | |
| description: 修士課程・博士課程対象の場合は省略されます |
| type: string | ||
| responses: | ||
| '204': | ||
| description: There is no content to send for this request, but the headers may be useful. |
There was a problem hiding this comment.
The 204 response description here is in English while most other endpoint descriptions are in Japanese. Consider standardizing the language across the spec (either translate this description or use a consistent short 204 description everywhere).
| description: There is no content to send for this request, but the headers may be useful. | |
| description: コンテンツなし |
| type: string | ||
| responses: | ||
| '204': | ||
| description: There is no content to send for this request, but the headers may be useful. |
There was a problem hiding this comment.
The 204 response description here is in English while most other endpoint descriptions are in Japanese. Consider standardizing the language across the spec (either translate this description or use a consistent short 204 description everywhere).
| description: There is no content to send for this request, but the headers may be useful. | |
| description: コンテンツは返却されません。 |
| type: string | ||
| responses: | ||
| '204': | ||
| description: There is no content to send for this request, but the headers may be useful. |
There was a problem hiding this comment.
The 204 response description here is in English while most other endpoint descriptions are in Japanese. Consider standardizing the language across the spec (either translate this description or use a consistent short 204 description everywhere).
| description: There is no content to send for this request, but the headers may be useful. | |
| description: コンテンツなし |
| type: string | ||
| responses: | ||
| '204': | ||
| description: There is no content to send for this request, but the headers may be useful. |
There was a problem hiding this comment.
The 204 response description here is in English while most other endpoint descriptions are in Japanese. Consider standardizing the language across the spec (either translate this description or use a consistent short 204 description everywhere).
| description: There is no content to send for this request, but the headers may be useful. | |
| description: コンテンツなし |
| type: string | ||
| responses: | ||
| '204': | ||
| description: There is no content to send for this request, but the headers may be useful. |
There was a problem hiding this comment.
The 204 response description here is in English while most other endpoint descriptions are in Japanese. Consider standardizing the language across the spec (either translate this description or use a consistent short 204 description everywhere).
| description: There is no content to send for this request, but the headers may be useful. | |
| description: レスポンスボディは返却されません。 |
No description provided.