Files
java-ai-agents/claude-code-spring/.claude/skills/new-endpoint/SKILL.md
T

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.