liveBook · Manning

@ResourceProperties

As explained in Quarkus in Action

@ResourceProperties is a REST Data annotation that configures properties of a generated resource, such as its REST path or pagination behavior.

@ResourceProperties configures a generated REST Data resource at the interface level. Use it when the class-derived endpoint path is unsuitable or when collection responses need pagination behavior. section 7.4

REST Data supplies generated CRUD implementations at build time. The annotation customizes the inherited resource interface, while method-specific exposure changes belong to @MethodProperties on an overriding declaration. section 7.4

Set a resource root path

@ResourceProperties(path = "/admin/reservation") public interface ReservationCrudResource extends PanacheEntityResource<Reservation, Long> { } section 7.4

How Quarkus in Action covers it

How deep it goes
Defines path and pagination roles with a working path example, but does not detail pagination configuration.
Examples
Uses ReservationCrudResource to expose generated Reservation CRUD operations under /admin/reservation and display them in Swagger UI.
What it assumes
Assumes a REST Data interface extending PanacheEntityResource or PanacheRepositoryResource.
What you can do after
Apply it by annotating a REST Data interface to replace its class-derived endpoint root path.
How it connects
Connects REST Data with PanacheEntityResource, generated CRUD resources, @MethodProperties, JAX-RS, and Swagger UI.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Quarkus in Action. The section links point to the parts of the book it draws on.