Funch APIの一覧取得#5
Open
hikaru-0602 wants to merge 17 commits into
Open
Conversation
sayo-o518
approved these changes
Apr 20, 2026
KurenNagata
approved these changes
Apr 20, 2026
KAZZ00777
approved these changes
Apr 20, 2026
There was a problem hiding this comment.
Pull request overview
Adds the initial “menu items list” (GET) flow for the Funch API by introducing menu domain/database models, a read-only repository/service/handler stack, and wiring the generated OpenAPI handlers into the server.
Changes:
- Add MenuItem / MenuItemPrice DB models + migration, and corresponding domain models
- Implement repository/service/handler for
GET /v1/menuItems?date=... - Wire the handler into
cmd/server/main.gousing oapi-codegen strict server
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| internal/service/funch.go | Service layer and repository interface for menu item listing by date |
| internal/repository/funch.go | GORM-based data access for menu items and their prices |
| internal/handler/get_menu_items_v1.go | Strict handler implementation for listing menu items |
| internal/handler/funch.go | Handler DI container for menu item service |
| internal/handler/converter.go | Domain → OpenAPI response model conversion |
| internal/domain/funch.go | Domain models and enums (Category/Size) |
| internal/database/migrate.go | AutoMigrate now includes new tables |
| internal/database/funch.go | GORM models + domain mapping helpers |
| go.mod | Module path updated to github.com/fun-dotto/funch-api |
| cmd/server/main.go | Instantiate repository/service/handler and register OpenAPI routes |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+36
to
+58
| post: | ||
| operationId: MenuItemsV1_create | ||
| parameters: [] | ||
| responses: | ||
| '201': | ||
| description: The request has succeeded and a new resource has been created as a result. | ||
| content: | ||
| application/json: | ||
| schema: | ||
| type: object | ||
| properties: | ||
| menuItem: | ||
| $ref: '#/components/schemas/MenuItem' | ||
| required: | ||
| - menuItem | ||
| tags: | ||
| - MenuItems | ||
| requestBody: | ||
| required: true | ||
| content: | ||
| application/json: | ||
| schema: | ||
| $ref: '#/components/schemas/MenuItemRequest' |
Comment on lines
+5
to
+11
| "fmt" | ||
|
|
||
| api "github.com/fun-dotto/funch-api/generated" | ||
| ) | ||
|
|
||
| func (h *Handler) MenuItemsV1Create(ctx context.Context, request api.MenuItemsV1CreateRequestObject) (api.MenuItemsV1CreateResponseObject, error) { | ||
| return nil, fmt.Errorf("not implemented") |
Comment on lines
49
to
+52
| router.Use(middleware.OapiRequestValidator(spec)) | ||
|
|
||
| // TODO: Implement handler | ||
| strictHandler := api.NewStrictHandler(h, nil) | ||
| api.RegisterHandlers(router, strictHandler) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
../way/.github/PULL_REQUEST_TEMPLATE.md
やったこと