Skip to content

1000kit/tkit-quarkus-rest

Repository files navigation

tkit-quarkus-rest

1000kit Quarkus REST extension

License Maven Central GitHub Actions Status

Documentation

Example project with this extension is in the 1000kit JPA guides

This 1000kit extension contains DTO and Exception for the REST interface.

OpenID connect interceptor

rest-client/mp-rest/url=https://service
rest-client/mp-rest/providers=org.tkit.quarkus.rs.interceptors.OpenIDConnectInterceptor

Config

Property Env Default Values Description
tkit.rs.mapper.log TKIT_RS_MAPPER_LOG true true,false Disable or enable log in the exception mapper

DTO

All DTO classes are in the package org.tkit.quarkus.rs.models. These classes have weak reference to the Entity classes and PageResult class in the tkit-quarkus-jpar extension. The class RestExceptionDTO is for the RestException.

Exception

This extension define the RestException which should be use in the RestController. This exception support translation for the errorCode with parameters. The local is taken from the HTTP request. For default value use Quarkus configuration value quarkus.default-locale. Exception is in the package org.tkit.quarkus.rs.exceptions

Mappers

In the package org.tkit.quarkus.rs.mappers is the ExceptionMapper for all Exception in the project with priority 10000. You can extend and overwrite this ExceptionMapper. Use the @Priority to overwrite existing registration.

Create a release

mvn semver-release:release-create

Create a patch branch

mvn semver-release:patch-create -DpatchVersion=x.x.0