402-frameworks-quarkus-rest

Solid

Use when you need to design, review, or improve REST APIs with Quarkus REST (Jakarta REST) — including resource classes, HTTP methods, status codes, request/response DTOs, Bean Validation, exception mappers, optional runtime OpenAPI exposure (SmallRye), contract-first generation from OpenAPI, content negotiation, pagination, sorting and filtering, API versioning, idempotency (Idempotency-Key), optimistic concurrency (ETag / If-Match), HTTP caching (Cache-Control), API deprecation (Sunset / Deprecation headers), RFC 7807 Problem Details, ISO-8601 for time in contracts, and security-aware boundaries. Part of the skills-for-java project

AI & Automation 393 stars 78 forks Updated today Apache-2.0

Install

View on GitHub

Quality Score: 92/100

Stars 20%
86
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Quarkus REST API Guidelines Apply REST API design principles on Quarkus using Jakarta REST (JAX-RS). **What is covered in this Skill?** - Resource classes, @Path, HTTP method mapping, and resource URI design - Status codes, Location headers, and Response building - DTOs and Bean Validation at the boundary; ISO-8601 for date/time fields - ExceptionMapper for consistent error JSON (RFC 7807 Problem Details) - API versioning strategies (URI path, Accept header) - Idempotency with Idempotency-Key header - Optimistic concurrency: ETag, If-Match, If-None-Match - HTTP caching with Cache-Control headers - API deprecation: Sunset and Deprecation headers - Pagination, sorting, and filtering query parameters - Optional `/openapi` via SmallRye; API-first contract maintained in `openapi.yaml` (codegen) - Reactive vs blocking considerations; @RunOnVirtualThread - Security integration at the filter layer **Scope:** Apply recommendations based on the reference rules and good/bad code examples. ## Constraints Before applying REST changes, ensure the project compiles. After applying improvements, run full verification. - **MANDATORY**: Run `./mvnw compile` or `mvn compile` before applying any change - **PREREQUISITE**: Project must compile before applying REST API improvements - **SAFETY**: If compilation fails, stop immediately - **BLOCKING CONDITION**: Compilation errors must be resolved by the user before proceeding - **VERIFY**: Run `./mvnw clean verify` or `mvn clean verify` afte...

Details

Author
jabrena
Repository
jabrena/cursor-rules-java
Created
1 years ago
Last Updated
today
Language
Java
License
Apache-2.0

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Solid

302-frameworks-spring-boot-rest

Use when you need to design, review, or improve REST APIs with Spring Boot — including HTTP methods, resource URIs, status codes, DTOs, versioning, deprecation and sunset headers, content negotiation (JSON and vendor media types), ISO-8601 instants in DTOs, pagination/sorting/filtering, Bean Validation at the boundary, idempotency, ETag concurrency, HTTP caching, error handling, security, contract-first OpenAPI (OpenAPI Generator), controller advice, and problem details for errors. This should trigger for requests such as Review Java code for Spring Boot REST API; Apply best practices for Spring Boot REST API in Java code. Part of cursor-rules-java project

393 Updated today
jabrena
AI & Automation Solid

401-frameworks-quarkus-core

Use when building or reviewing core Quarkus applications with CDI beans and scopes, SmallRye Config and profiles, lifecycle, interceptors and events, virtual threads, and test-friendly design. Part of the skills-for-java project

393 Updated today
jabrena
API & Backend Solid

502-frameworks-micronaut-rest

Use when you need to design, review, or improve REST APIs with Micronaut — including @Controller routes, HTTP status codes, DTOs, Bean Validation, exception handlers, pagination, idempotency, ETag/If-Match, caching headers, versioning, contract-first OpenAPI (OpenAPI Generator), optional runtime OpenAPI via micronaut-openapi, and security annotations. Part of the skills-for-java project

393 Updated today
jabrena
Testing & QA Solid

422-frameworks-quarkus-testing-integration-tests

Use when you need to write or improve integration tests for Quarkus — including @QuarkusTest, Dev Services for automatic container provisioning, Testcontainers via QuarkusTestResourceLifecycleManager, WireMock for external HTTP stubs, @QuarkusIntegrationTest for black-box testing against packaged artifacts, REST Assured, data isolation strategies (@TestTransaction vs @BeforeEach cleanup), and Maven Surefire/Failsafe three-tier split (*Test, *IT, *AT). Part of the skills-for-java project

393 Updated today
jabrena
Testing & QA Solid

421-frameworks-quarkus-testing-unit-tests

Use when you need to write fast unit tests for Quarkus applications — including pure tests with @ExtendWith(MockitoExtension.class), @QuarkusTest with @InjectMock for full CDI mock replacement, @InjectSpy for partial CDI bean mocking, REST Assured for resource-focused tests, @ParameterizedTest with @CsvSource / @MethodSource, QuarkusTestProfile for test-specific configuration overrides, and naming conventions (*Test → Surefire, *IT → Failsafe). For framework-agnostic Java use @131-java-testing-unit-testing. Part of the skills-for-java project

393 Updated today
jabrena