Fork me on GitHub

OpenAPI / Swagger Tutorial

This tutorial demonstrates using OpenAPI / Swagger to document available REST end points.

The example application for this tutorial has the following configuration:

SwaggerHttpServer configuration.

Tutorial Source

Configuring OpenAPI / Swagger

To configure OpenAPI / Swagger into an application, add the following to pom.xml


This is all that is necessary.

Once added the Swagger becomes available:

SwaggerHttpServer swagger.

Customising OpenAPI

The defaults are generally adequate to document most applications. However, if more control is required, the OpenApiOperationExtensionServiceFactory provides means to customise the OpenAPI.


The next tutorial covers CORS.