Skip to content
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
132 lines (93 sloc) 4.45 KB

KumuluzEE OpenAPI MicroProfile

Build Status

KumuluzEE OpenAPI MicroProfile project provides powerful tools to incorporate the OpenAPI 3 specification to your microservices in a standardized way.

KumuluzEE OpenAPI MicroProfile project allows you to document microservice APIs using OpenAPI v3 compliant annotations. Project will automatically hook-up servlet that will serve your API specifications on endpoint /openapi. The project implements the MicroProfile OpenAPI specification.

More details:


You can enable KumuluzEE OpenAPI MicroProfile support by adding the following dependency:


OpenAPI configuration

When kumuluzee-openapi-mp dependency is included in the project, you can start documenting your REST API using MicroProfile OpenAPI annotations.

Documenting application class

@SecurityScheme(securitySchemeName = "openid-connect", type = SecuritySchemeType.OPENIDCONNECT,
        openIdConnectUrl = "http://auth-server-url/.well-known/openid-configuration")
@OpenAPIDefinition(info = @Info(title = "CustomerApi", version = "v2.0.0", contact = @Contact(), license = @License(name="something")), servers = @Server(url = "http://localhost:8080/v2"), security
        = @SecurityRequirement(name = "openid-connect"))
public class CustomerApplication extends Application {

Documenting resource class and operations

public class CustomerResource {

    @Operation(summary = "Get customers details", description = "Returns customer details.")
            @APIResponse(description = "Customer details", responseCode = "200", content = @Content(schema = @Schema(implementation =
    public Response getCustomer(@PathParam("customerId") String customerId) {
        // ...


Accessing API specification

Build and run project using:

mvn clean package
java -jar target/${}.jar

After startup API specification will be available at:




Serving OpenAPI specification can be disabled by setting property kumuluzee.openapi-mp.enabled to false. By default serving API spec is enabled.


The KumuluzEE OpenAPI MicroProfile extension can be configured with the standard KumuluzEE configuration mechanism. For example with the config.yml file:

    enabled: true
      mapping: /openapi-custom-mapping

Some interesting configuration properties are:

  • kumuluzee.openapi-mp.enabled - If set to false disables the extension (and OpenAPI servlet). Default value: true
  • kumuluzee.openapi-mp.servlet.mapping - The endpoint at which the OpenAPI specification is available. Default value: /openapi
  • kumuluzee.openapi-mp.scan.packages - Comma separated list of packages which are scanned for the OpenAPI annotations. By default, all packages are scanned.

Full list of configuration properties can be found in MicroProfile OpenAPI specification.


Recent changes can be viewed on Github on the Releases Page


See the contributing docs

When submitting an issue, please follow the guidelines.

When submitting a bugfix, write a test that exposes the bug and fails before applying your fix. Submit the test alongside the fix.

When submitting a new feature, add tests that cover the feature.



You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.