public class OpenAPIModule extends Object implements Extension
{
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/openapiModifier and Type | Class and Description |
---|---|
static class |
OpenAPIModule.Format
Available formats.
|
Constructor and Description |
---|
OpenAPIModule()
Creates an OpenAPI module.
|
OpenAPIModule(String path)
Creates an OpenAPI module.
|
Modifier and Type | Method and Description |
---|---|
OpenAPIModule |
format(OpenAPIModule.Format... format)
Enable what format are available (json or yaml).
|
void |
install(Jooby application)
Install, configure additional features to a Jooby application.
|
OpenAPIModule |
redoc(String path)
Customize the redoc-ui path.
|
OpenAPIModule |
swaggerUI(String path)
Customize the swagger-ui path.
|
public OpenAPIModule(@Nonnull String path)
install(new OpenAPIModule("/docs"));
Files will be at /docs/openapi.json
, /docs/openapi.yaml
.path
- Custom path to use.public OpenAPIModule()
/openapi.json
, /openapi.yaml
.@Nonnull public OpenAPIModule swaggerUI(@Nonnull String path)
/swagger
.path
- Swagger-ui path.@Nonnull public OpenAPIModule redoc(@Nonnull String path)
/redoc
.path
- Redoc path.@Nonnull public OpenAPIModule format(@Nonnull OpenAPIModule.Format... format)
format
- Supported formats.Copyright © 2020. All rights reserved.