Claude Code Spring Boot Web API Skill for ProblemDetail Validation
Map invalid requests to a consistent ProblemDetail response using controller validation and shared error handling. Add success and failure checks to the REST contract.
中文Install in Claude Code
Use Claude Code with the pinned skill and a compatible Spring Web project. Bring the API contract and a local test environment.
- Get the complete `plugins/spring-boot/skills/spring-boot-web-api` directory from the pinned GitHub checkout.
- Copy it under the target project's `.claude/skills/`. Confirm `.claude/skills/spring-boot-web-api/SKILL.md`, open Claude Code at the project root, and call `/spring-boot-web-api`.
Example task
For a fictional room booking endpoint, end time cannot precede start time. Specify a validation problem for invalid input and keep the existing success response for valid input.What to check
Expect the intended HTTP error and a consistent ProblemDetail that identifies the failed rule. Valid requests keep their existing response.
Original SKILL.md on GitHub · Updated
Frequently asked question
Should ProblemDetail include the internal exception stack?
Include the client-facing type, status, title, and actionable detail. Keep internal diagnostics in controlled logs.