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+json
Make sure that
IgniteExceptionHandler
has 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.