spring-boot-rest-api-standards
This skill guides you through building well-structured REST APIs in Spring Boot, covering resource-based URL design, proper HTTP method usage, appropriate status codes, and DTO patterns. It includes strategies for validation, global exception handling, pagination setup, and security header configuration. Use it when creating endpoints, designing API contracts, or reviewing REST architecture.
spring-boot-rest-api-standards helps you design and implement REST endpoints following Spring Boot conventions for URLs, HTTP methods, status codes, DTOs, validation, and error handling.
AI-generated summary based on this skill's SKILL.md
Decision gist · record as of 2026-06-22
spring-boot-rest-api-standards helps you design and implement REST endpoints following Spring Boot conventions for URLs, HTTP methods, status codes, DTOs, validation, and error handling. This skill guides you through building well-structured REST APIs in Spring Boot, covering resource-based URL design, proper HTTP method usage, appropriate status codes, and DTO patterns. It includes strategies for validation, global exception handling, pagination setup, and security header configuration. Use it when creating endpoints, designing API contracts, or reviewing REST architecture.
Use it when
- spring-boot-rest-api-standards teaches global error handling through @ControllerAdvice and @ExceptionHandler annotations.
- spring-boot-rest-api-standards covers DTO validation using Spring's validation framework with annotations like @NotNull, @NotBlank, @Email.
Verify before relying
Read SKILL.md below before installing (8 files). Open directory: indexed for reading, not audited.
Install
giuseppe-trisciuoglio/developer-kit/spring-boot-rest-api-standards · repository language: Python
Open directory. Skills are indexed for reading, not audited. Review a skill's body before installing it.
Frequently asked questions
AI-generated answers based on this skill's SKILL.md and metadata
How do I design REST endpoints in Spring Boot following best practices?
spring-boot-rest-api-standards guides you through resource-based URL design, proper HTTP method usage, and appropriate status codes. Focus on noun-based endpoints (e.g., /api/users, /api/orders) rather than verb-based ones, use GET for retrieval, POST for creation, PUT/PATCH for updates, and DELETE for removal. The skill covers implementing these patterns with Spring Boot annotations like @RestController, @GetMapping, @PostMapping, and @RequestBody to ensure your endpoints follow REST conventions.
What is the best way to handle errors in a Spring Boot REST API?
spring-boot-rest-api-standards teaches global error handling through @ControllerAdvice and @ExceptionHandler annotations. This approach centralizes exception management, allowing you to catch specific exceptions and return standardized error responses with appropriate HTTP status codes. The skill shows how to create consistent error response DTOs containing error codes, messages, and timestamps, ensuring clients receive predictable error formats across all endpoints.
How should I validate request and response DTOs in Spring Boot?
spring-boot-rest-api-standards covers DTO validation using Spring's validation framework with annotations like @NotNull, @NotBlank, @Email, and @Size. Create separate request and response DTOs to maintain proper separation of concerns—request DTOs handle incoming data validation while response DTOs shape outgoing data. Use @Valid on controller method parameters to trigger validation, and combine with global exception handling to return validation error details.
How do I implement pagination in a Spring Boot REST API?
spring-boot-rest-api-standards shows how to configure pagination using Spring Data's Pageable interface. Accept pagination parameters (page, size, sort) in your controller methods, pass them to repository queries, and return Page objects. This enables clients to request specific result subsets efficiently. The skill demonstrates proper response formatting that includes total count, current page, and available pages for client-side navigation.
What security headers and CORS configuration does spring-boot-rest-api-standards cover?
spring-boot-rest-api-standards addresses production-ready security through CORS configuration and security headers. Learn to configure allowed origins, HTTP methods, and credentials using @CrossOrigin or WebMvcConfigurer. The skill includes setting security headers like X-Content-Type-Options, X-Frame-Options, and Strict-Transport-Security to protect against common vulnerabilities and ensure your API meets enterprise security requirements.
Can I use spring-boot-rest-api-standards to review existing REST API code?
Yes, spring-boot-rest-api-standards includes a REST API review checklist covering REST standards compliance. Use it to audit your existing endpoints for proper HTTP method usage, status code appropriateness, URL design consistency, DTO patterns, error handling standardization, and security configurations. This helps identify gaps between your current implementation and REST best practices.
SKILL.md
Rendered from the published skill. Quoted content, verbatim.
Spring Boot REST API Standards
Overview
REST API design standards for Spring Boot covering URL design, HTTP methods, status codes, DTOs, validation, error handling, pagination, and security headers.
When to Use
- Creating REST endpoints and API routes
- Designing DTOs and API contracts
- Implementing error handling and validation
- Setting up pagination and filtering
- Configuring security headers and CORS
- Reviewing REST API architecture
Instructions
To Build RESTful API Endpoints
Follow these steps to create well-designed REST API endpoints:
- Design Resource-Based URLs
- Use plural nouns for resource names
- Follow REST conventions: GET /users, POST /users, PUT /users/{id}
-
Avoid action-based URLs like /getUserList
-
Implement Proper HTTP Methods
- GET: Retrieve resources (safe, idempotent)
- POST: Create
(truncated - see the full file via the links below)
File tree — 8 files
plugins/developer-kit-java/skills/spring-boot-rest-api-standards/SKILL.md
plugins/developer-kit-java/skills/spring-boot-rest-api-standards/references/architecture-patterns.md
plugins/developer-kit-java/skills/spring-boot-rest-api-standards/references/examples.md
plugins/developer-kit-java/skills/spring-boot-rest-api-standards/references/http-reference.md
plugins/developer-kit-java/skills/spring-boot-rest-api-standards/references/pagination-and-filtering.md
plugins/developer-kit-java/skills/spring-boot-rest-api-standards/references/references.md
plugins/developer-kit-java/skills/spring-boot-rest-api-standards/references/security-headers.md
plugins/developer-kit-java/skills/spring-boot-rest-api-standards/references/spring-web-annotations.md
Let your AI agent find skills like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 56,283 agent skills by what they can do, searchable in plain language.
wish › “Design and implement REST API endpoints following Spring Boot best practices”
Give your agent the search over MCP, or paste the wish link into any chat. No install? Search from any chat →
Related skills
Audit your REST API design against best practices for HTTP verb selection, versioning strategies, and status code correctness. Catches common mistakes like wrong HTTP methods, missing API versions, entity leaks, and improper error handling that break client compatibility.
This skill scaffolds end-to-end CRUD operations for Spring Boot 3.5+ applications using feature-focused, domain-driven design patterns. It generates domain aggregates, repository contracts, JPA persistence adapters, application services, and REST controllers with proper separation of concerns and validation gates. Use it to build REST endpoints, implement database operations, or diagnose transaction boundaries in existing Spring Boot services.
Spring Boot Test Patterns guides you through layered testing strategies—from fast unit tests with mocked dependencies to full integration tests with real databases via Testcontainers. Learn focused slice testing with @DataJpaTest and @WebMvcTest, REST API testing with MockMvc, and container setup using @ServiceConnection for Spring Boot 3.5+.
Implement stateless JWT authentication in Spring Boot 3.5 applications with Spring Security 6.x and JJWT 0.12.6. This skill covers token generation and validation, Bearer and HttpOnly cookie strategies, refresh token rotation, role and permission-based access control, and OAuth2 provider integration. Use it to secure REST APIs with method-level authorization rules and token revocation patterns.
Set up production-ready observability for Spring Boot services using Actuator endpoints, health probes, and Micrometer integration. This skill covers dependency setup, endpoint exposure, security policies, custom health indicators, and metrics export to systems like Prometheus. Follow step-by-step instructions to bootstrap monitoring, secure management traffic, and enable diagnostics tooling for incident response.
Automates Spring Boot project initialization by downloading from Spring Initializr and generating a complete project structure with your chosen architecture pattern (DDD or Layered), pre-configured JPA, SpringDoc OpenAPI, and Docker Compose services for PostgreSQL, Redis, or MongoDB. Handles dependency management, application properties, and local development setup in one workflow.