Skip to content

Commit bcb5b4c

Browse files
mirrored the comments from the RPC to the protofile
This way, we make sure that they are actually displayed to the users
1 parent 2b3a542 commit bcb5b4c

5 files changed

+14
-8
lines changed

server/api/tumdev/campus_backend.pb.go

+4-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

server/api/tumdev/campus_backend.proto

+5-2
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ service Campus {
9191
};
9292
}
9393

94+
// Returns all dishes for a specific cafeteria, year, week and day
9495
rpc ListDishes(ListDishesRequest) returns (ListDishesReply) {
9596
option (google.api.http) = {
9697
get: "/dishes",
@@ -389,9 +390,11 @@ message ListDishesRequest {
389390
string canteen_id = 1;
390391
// >=2022 until the current year
391392
int32 year = 2;
392-
// range 1 - 53
393+
// Week of the dish.
394+
// Must be in the range 1 - 52
393395
int32 week = 3;
394-
// range 0 (Monday) - 4 (Friday)
396+
// Day of the week
397+
// Days must be in the range 0 (Monday) - 4 (Friday)
395398
int32 day = 4;
396399
}
397400

server/api/tumdev/campus_backend.swagger.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -434,6 +434,7 @@
434434
},
435435
"/dishes": {
436436
"get": {
437+
"summary": "Returns all dishes for a specific cafeteria, year, week and day",
437438
"operationId": "Campus_ListDishes",
438439
"responses": {
439440
"200": {
@@ -469,15 +470,15 @@
469470
},
470471
{
471472
"name": "week",
472-
"description": "range 1 - 53",
473+
"description": "Week of the dish.\nMust be in the range 1 - 52",
473474
"in": "query",
474475
"required": false,
475476
"type": "integer",
476477
"format": "int32"
477478
},
478479
{
479480
"name": "day",
480-
"description": "range 0 (Monday) - 4 (Friday)",
481+
"description": "Day of the week\nDays must be in the range 0 (Monday) - 4 (Friday)",
481482
"in": "query",
482483
"required": false,
483484
"type": "integer",

server/api/tumdev/campus_backend_grpc.pb.go

+2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

server/backend/cafeteria.go

-2
Original file line numberDiff line numberDiff line change
@@ -638,8 +638,6 @@ func (s *CampusServer) GetCafeterias(ctx context.Context, _ *pb.ListCanteensRequ
638638
}, requestStatus
639639
}
640640

641-
// ListDishes gRPC Endpoint
642-
// Returns all dishes for a specific cafeteria, year, week and day
643641
func (s *CampusServer) ListDishes(ctx context.Context, req *pb.ListDishesRequest) (*pb.ListDishesReply, error) {
644642
if req.Year < 2022 {
645643
return &pb.ListDishesReply{}, status.Error(codes.Internal, "Years must be larger or equal to 2022 ") // currently, no previous values have been added

0 commit comments

Comments
 (0)