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-enabled Paging params class converts page/size/order query parameters into a Micronaut Pageable. The QueryParamGuard rejects any query parameter that no endpoint binding declares.

Response shaping

The Envelope<T> interface is the standardized response envelope; the concrete shapes are SingleEnvelope and SliceEnvelope. Envelopes.slice(…​) turns a Micronaut Page or Slice into a SliceEnvelope.

Modules

The library currently ships a single published module, conta-http-kit, containing both pillars.

Package Contents

no.conta.http

Envelope<T>, SingleEnvelope, SliceEnvelope — the standardized response envelope (plain Lombok, no serialization annotations).

no.conta.http.problem

HttpProblemCode — standard STD-2xxx problem codes (no Micronaut dependency).

no.conta.http.mn

Paging, Envelopes, QueryParamGuard, OrderFieldsGuard, OrderFields — the Micronaut request/response helpers.

Getting started

See Getting started for the dependency coordinate and Micronaut wiring.