-
Notifications
You must be signed in to change notification settings - Fork 1
added controller folder with Route controller file #8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| package com.shopping.inandout.routeservice.controller; | ||
|
|
||
| import org.springframework.web.bind.annotation.*; | ||
|
|
||
| @RestController | ||
| @RequestMapping("/api/stores/{storeId}/routes") | ||
| public class RouteController { | ||
|
|
||
| private final RouteService routeService; | ||
|
|
||
| public RouteController(RouteService routeService) { | ||
| this.routeService = routeService; | ||
| } | ||
|
|
||
| @PostMapping | ||
| public RouteSummary createRoute( | ||
| @PathVariable String storeId, | ||
| @RequestBody CreateRouteInput request) { | ||
|
|
||
| return routeService.createRoute(storeId, request); | ||
| } | ||
|
|
||
| @GetMapping("/{routeId}") | ||
| public RouteSummary getRoute( | ||
| @PathVariable String storeId, | ||
| @PathVariable String routeId) { | ||
|
|
||
| return routeService.getRoute(storeId, routeId); | ||
| } | ||
|
|
||
| @DeleteMapping("/{routeId}") | ||
| public RouteSummary deleteRoute( | ||
| @PathVariable String storeId, | ||
| @PathVariable String routeId) { | ||
|
|
||
| return routeService.deleteRoute(storeId, routeId); | ||
| } | ||
|
Comment on lines
+9
to
+37
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "RouteController imports and referenced symbols:"
sed -n '1,80p' src/main/java/com/shopping/inandout/routeservice/controller/RouteController.java
echo
echo "Locate declarations for RouteService, CreateRouteInput, RouteSummary:"
rg -n --type=java -C2 '^\s*(public\s+)?(class|interface|record)\s+(RouteService|CreateRouteInput|RouteSummary)\b|^\s*package\s+'Repository: InAndOut-Stack/InAndOut-Route-Service Length of output: 2238 🏁 Script executed: # Search for RouteService definition
echo "=== Searching for RouteService ==="
rg -n "class\s+RouteService|interface\s+RouteService" --type=java
echo
echo "=== Searching for CreateRouteInput definition ==="
rg -n "class\s+CreateRouteInput|record\s+CreateRouteInput" --type=java
echo
echo "=== Searching for RouteSummary definition ==="
rg -n "class\s+RouteSummary|record\s+RouteSummary|interface\s+RouteSummary" --type=java
echo
echo "=== All Java files in src/main ==="
find src/main -name "*.java" -type fRepository: InAndOut-Stack/InAndOut-Route-Service Length of output: 649 🏁 Script executed: # Check for build files
echo "=== Build files ==="
ls -la | grep -E "pom.xml|build.gradle|build.gradle.kts"
# Check pom.xml for dependencies if it exists
if [ -f pom.xml ]; then
echo
echo "=== pom.xml dependencies ==="
head -50 pom.xml
fi
# Check if RouteController file is complete
echo
echo "=== Full RouteController.java ==="
cat src/main/java/com/shopping/inandout/routeservice/controller/RouteController.javaRepository: InAndOut-Stack/InAndOut-Route-Service Length of output: 1210 🏁 Script executed: cat build.gradle.ktsRepository: InAndOut-Stack/InAndOut-Route-Service Length of output: 3815 Add missing imports for Smithy-generated types.
🤖 Prompt for AI Agents |
||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indeed, a more stable version would be better