Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017ic4b86yyhhudsSLnwNUFY
17 lines
734 B
Markdown
17 lines
734 B
Markdown
---
|
|
name: new-endpoint
|
|
description: Adds a REST endpoint to the orders service the way this project does it (controller, service, tests). Use when asked to add or extend an endpoint.
|
|
argument-hint: "[what the endpoint should do]"
|
|
allowed-tools: Bash(mvn *)
|
|
---
|
|
|
|
Add an endpoint for: $ARGUMENTS
|
|
|
|
Follow these steps in order.
|
|
|
|
1. Read `OrderController` and `OrderService` first and copy their style.
|
|
2. Put business logic in `OrderService`, a unit test in `OrderServiceTest` first (red), then the code (green).
|
|
3. Add the controller method and a MockMvc case in `OrderControllerTest`.
|
|
4. Run `mvn -B -q test`. Do not report done until it is green.
|
|
5. Reply with the new route, the status codes it returns, and the test names you added.
|