public final class OpenApiViewConfig
extends java.lang.Object
| 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()
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.
|
java.lang.String |
toString() |
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 - java.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()
public void setSpecFile(java.lang.String specFile)
specFile - The openApi specification file name.public java.lang.String toString()
toString in class java.lang.Object