Installation

The library is published to the conta-open Maven repository on GitLab. Add the repository to your build:

repositories {
    mavenCentral()
    maven {
        name 'contaOpen'
        url 'https://gitlab.com/api/v4/groups/12992043/-/packages/maven'
    }
}

For the latest released version, see the tags page. Replace <version> in the snippets below with that value.

Server-side (controllers)

For Micronaut services that throw problems, depend on conta-problem-json-mn:

dependencies {
    implementation 'no.conta.problem:conta-problem-json-mn:<version>'
}

This module brings the API along transitively and registers the Micronaut error handlers that translate ThrowableProblem (and Bean Validation errors) into application/problem+json responses.

Client-side (forwarding)

For Micronaut services that consume upstream services and want to forward their problem responses, depend on conta-problem-json-mn-client:

dependencies {
    implementation 'no.conta.problem:conta-problem-json-mn-client:<version>'
}