agentsclimarketplace

Spring boot api design

Skill ComeOnOliver/skillshub/skills/HoangNguyen0403/agent-skills-standard/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)From its SKILL.md

Install
npx -y skills add ComeOnOliver/skillshub --skill spring-boot-api-design

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

SKILL.md

1.2 KB, 233 tokens by cl100k_base, 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 @Operation and @ApiResponse. Keep clean.
  • Schema: Define examples in @Schema on 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 ProblemDetail with 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.

References

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.