This module defines REST APIs that might be provided by Ignite 3. Also, common DTOs and error handlers are defined.
The API definition is a java interface annotated with micronaut @Controller
annotations and several swagger-annotations. All those annotations are needed to generate a valid Open API spec from these interfaces.
ClusterManagementApi is an example of API definition.
Ignite 3 implements the application/problem+json in all endpoints. That's why problem definition and common problem handling are defined in this module. Here is how it works:
IgniteException is thrown in any Ignite componentIgniteExceptionHandler is invoked by micronaut infrastructureIgniteExceptionHandler handles IgniteException and returns a valid application/problem+jsonMake sure that
IgniteExceptionHandlerhas been loaded into micronaut context otherwise this class won't be invoked.
If you want to implement your exception handler the best place to do it is the module where you define the REST controller. Don't put your handlers in ignite-rest-api unless it is needed for all REST endpoints.