Spring boot api design
Skill ComeOnOliver/skillshub/skills/HoangNguyen0403/agent-skills-standard/spring-boot-api-design
🧠The right skill, one API call. AI agent skills registry with token-efficient skill resolution. 5,000+ skills from 500+ top repos.
npx -y skills add ComeOnOliver/skillshub --skill spring-boot-api-designAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
What its author says it does
Copied from the file, not written here
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)
SKILL.md
1.2 KB, as published. Nobody here has run it
Spring Boot API Design Standards
Priority: P0
Implementation Guidelines
OpenAPI (Swagger)
- SpringDoc: Use
springdoc-openapi-starter-webmvc-ui. - Annotations: Use
@Operationand@ApiResponse. Keep clean. - Schema: Define examples in
@Schemaon DTOs.
API Versioning
- Strategy: Prefer URI Versioning (
/api/v1/) for caching simplicity. - Deprecation: Use
@Deprecated+ OpenAPI flag.
Error Handling (RFC 7807)
- ProblemDetails: Enable
spring.mvc.problem-details.enabled=true. - Extension: Extend
ProblemDetailwith custom fields if needed. - 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.