A lightweight JAX-RS-like annotation processor for building REST APIs with Vert.x verticles.
Rest.Vertx is a lightweight annotation processor for Vert.x that enables developers to build RESTful web services using JAX-RS-style annotations. It simplifies API development by automatically handling routing, request/response serialization, and parameter binding, reducing the need for manual Vert.x router configuration. The library integrates seamlessly with Vert.x's reactive and non-blocking architecture, making it suitable for high-performance applications.
Java developers building REST APIs with Vert.x who prefer a declarative, annotation-based approach similar to JAX-RS or Spring MVC. It is particularly useful for teams migrating from traditional JAX-RS frameworks to Vert.x or those seeking to reduce boilerplate in Vert.x web services.
Rest.Vertx offers a familiar JAX-RS annotation syntax while leveraging Vert.x's performance and scalability. It provides a clean separation of concerns with built-in support for validation, security, and error handling, allowing developers to focus on business logic rather than infrastructure code.
A JAX-RS like annotation processor for vert.x verticals and more
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Uses standard annotations like @GET, @POST, and @Path, making it easy for developers with JAX-RS or Spring MVC experience to adopt, as shown in the example REST endpoint definitions.
Supports path variables, query parameters, headers, cookies, and matrix parameters with flexible readers, including raw and decoded options, detailed in the Paths and Query variables sections.
Provides @Authenticate and @Authorize annotations that integrate with Vert.x's security model, simplifying authentication and authorization with custom providers, as explained in the Authentication and Authorization chapter.
Allows global and per-endpoint exception handlers for consistent error responses, with support for multiple handlers and custom exceptions, evidenced in the Error handling section.
Integrates JSR 380 bean validation and JSR330 dependency injection providers like Guice, reducing boilerplate for data validation and service integration, as covered in Validation and Injection chapters.
The README highlights multiple breaking changes, such as the switch from javax to jakarta annotations and incompatibility between Vert.x 3 and 4, requiring careful migration and potentially disrupting existing projects.
To use JAX-RS Response builder, an external JAX-RS implementation like Jersey is required, adding complexity to setup and dependencies, as noted in the Response building section.
Using @Context fields in readers or writers disables caching, leading to re-initialization on every request and potential performance degradation, mentioned in the Internal caching and best practices parts.
Compared to larger frameworks like Spring Boot, it has a smaller community and fewer integrations; the README is detailed but relies on issue reporting for support, which may slow troubleshooting.