Conta HTTP
conta-http is Conta’s shared, open-source library for HTTP / API conventions on both sides of the call.
It standardizes how our APIs bind paginated requests and how they shape responses. It is the home of Conta’s standardized API response envelope.
The two pillars
- Request binding
-
The
@RequestBean-enabledPagingparams class converts page/size/order query parameters into a MicronautPageable. TheQueryParamGuardrejects any query parameter that no endpoint binding declares. - Response shaping
-
The
Envelope<T>interface is the standardized response envelope; the concrete shapes areSingleEnvelopeandSliceEnvelope.Envelopes.slice(…)turns a MicronautPageorSliceinto aSliceEnvelope.
Modules
The library currently ships a single published module, conta-http-kit, containing both pillars.
| Package | Contents |
|---|---|
|
|
|
|
|
|
Getting started
See Getting started for the dependency coordinate and Micronaut wiring.