public final class OpenApiViewConfig
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
RESOURCE_DIR |
static java.lang.String |
SLASH |
static java.lang.String |
TEMPLATES |
static java.lang.String |
TEMPLATES_RAPIDOC |
static java.lang.String |
TEMPLATES_RAPIPDF |
static java.lang.String |
TEMPLATES_REDOC |
static java.lang.String |
TEMPLATES_SWAGGER_UI |
static java.lang.String |
THEMES_DIR |
Modifier and Type | Method and Description |
---|---|
static OpenApiViewConfig |
fromSpecification(java.lang.String specification,
java.util.Properties openApiProperties)
Creates an OpenApiViewConfig form a String representation.
|
java.lang.String |
getSpecURL(io.micronaut.inject.visitor.VisitorContext context)
Returns the relative openApi specification url path.
|
java.lang.String |
getTitle()
Returns the title for the generated views.
|
boolean |
isEnabled()
Returns true when the generation of views is enabled.
|
void |
render(java.nio.file.Path outputDir,
io.micronaut.inject.visitor.VisitorContext visitorContext)
Generates the views given this configuration.
|
void |
setServerContextPath(java.lang.String contextPath)
Sets the server context path.
|
void |
setSpecFile(java.lang.String specFile)
Sets the generated openApi specification file name.
|
void |
setTitle(java.lang.String title)
Sets the title for the generated views.
|
public static final java.lang.String RESOURCE_DIR
public static final java.lang.String THEMES_DIR
public static final java.lang.String TEMPLATES
public static final java.lang.String TEMPLATES_RAPIPDF
public static final java.lang.String TEMPLATES_SWAGGER_UI
public static final java.lang.String TEMPLATES_REDOC
public static final java.lang.String TEMPLATES_RAPIDOC
public static final java.lang.String SLASH
public static OpenApiViewConfig fromSpecification(java.lang.String specification, java.util.Properties openApiProperties)
specification
- A String representation of an OpenApiViewConfig.openApiProperties
- The open api properties.public boolean isEnabled()
public void render(java.nio.file.Path outputDir, io.micronaut.inject.visitor.VisitorContext visitorContext) throws java.io.IOException
outputDir
- The destination directory of the generated views.visitorContext
- The visitor contextjava.io.IOException
- When the generation fails.public void setServerContextPath(java.lang.String contextPath)
contextPath
- The server context path.public java.lang.String getTitle()
public void setTitle(java.lang.String title)
title
- A title.public java.lang.String getSpecURL(io.micronaut.inject.visitor.VisitorContext context)
context
- Visitor context.public void setSpecFile(java.lang.String specFile)
specFile
- The openApi specification file name.