java.lang.Object
io.jooby.OpenAPIModule
- All Implemented Interfaces:
Extension
OpenAPI supports for Jooby. Basic Usage:
{
install(new OpenAPIModule());
}
The [openapi].json and/or [openapi].yaml files must be present on
classpath.
If jooby-swagger-ui is present (part of your project classpath) swagger-ui will
be available. Same for jooby-redoc.
Complete documentation is available at: https://jooby.io/modules/openapi
- Since:
- 2.7.0
- Author:
- edgar
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionCreates an OpenAPI module.OpenAPIModule(String path) Creates an OpenAPI module. -
Method Summary
Modifier and TypeMethodDescriptionformat(OpenAPIModule.Format... format) Enable what format are available (json or yaml).voidInstall, configure additional features to a Jooby application.Customize the redoc-ui path.Customize the swagger-ui path.
-
Constructor Details
-
OpenAPIModule
Creates an OpenAPI module. The path is used to route the open API files. For example:
Files will be atinstall(new OpenAPIModule("/docs"));/docs/openapi.json,/docs/openapi.yaml.- Parameters:
path- Custom path to use.
-
OpenAPIModule
public OpenAPIModule()Creates an OpenAPI module.Files will be at
/openapi.json,/openapi.yaml.
-
-
Method Details
-
swaggerUI
Customize the swagger-ui path. Defaults is/swagger.- Parameters:
path- Swagger-ui path.- Returns:
- This module.
-
redoc
Customize the redoc-ui path. Defaults is/redoc.- Parameters:
path- Redoc path.- Returns:
- This module.
-
format
Enable what format are available (json or yaml).IMPORTANT: UI tools requires the JSON format.
- Parameters:
format- Supported formats.- Returns:
- This module.
-
install
Description copied from interface:ExtensionInstall, configure additional features to a Jooby application.
-