Skillshub spring-boot-api-design
Standards for OpenAPI, Versioning, and Global Error Handling. Use when designing Spring Boot APIs with OpenAPI specs, versioning, or global error handling. (triggers: **/*Controller.java, openapi, swagger, versioning, problemdetails)
install
source · Clone the upstream repo
git clone https://github.com/ComeOnOliver/skillshub
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/ComeOnOliver/skillshub "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/HoangNguyen0403/agent-skills-standard/spring-boot-api-design" ~/.claude/skills/comeonoliver-skillshub-spring-boot-api-design && rm -rf "$T"
manifest:
skills/HoangNguyen0403/agent-skills-standard/spring-boot-api-design/SKILL.mdsource content
Spring Boot API Design Standards
Priority: P0
Implementation Guidelines
OpenAPI (Swagger)
- SpringDoc: Use
.springdoc-openapi-starter-webmvc-ui - Annotations: Use
and@Operation
. Keep clean.@ApiResponse - Schema: Define examples in
on DTOs.@Schema
API Versioning
- Strategy: Prefer URI Versioning (
) for caching simplicity./api/v1/ - Deprecation: Use
+ OpenAPI flag.@Deprecated
Error Handling (RFC 7807)
- ProblemDetails: Enable
.spring.mvc.problem-details.enabled=true - Extension: Extend
with custom fields if needed.ProblemDetail - Security: NEVER expose stack traces in API errors.
Anti-Patterns
- No Map<K,V> responses: Return typed DTO records instead.
- No Header Versioning: Use URI versioning; headers are hard to test/cache.
- No hidden APIs: Document all endpoints with Swagger/OpenAPI.