Skip to content

Latest commit

 

History

History
31 lines (22 loc) · 1.79 KB

README.md

File metadata and controls

31 lines (22 loc) · 1.79 KB

ignite-rest-api

This module defines REST APIs that might be provided by Ignite 3. Also, common DTOs and error handlers are defined.

API definition

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.

Error handling

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:

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.