public final class OpenApiViewConfig extends Object
Modifier and Type | Method and Description |
---|---|
static OpenApiViewConfig |
fromSpecification(String specification,
Properties openApiProperties)
Creates an OpenApiViewConfig form a String representation.
|
String |
getSpecURL()
Returns the relative openApi specification url path.
|
String |
getTitle()
Returns the title for the generated views.
|
boolean |
isEnabled()
Returns true when the generation of views is enabled.
|
void |
render(Path outputDir,
io.micronaut.inject.visitor.VisitorContext visitorContext)
Generates the views given this configuration.
|
void |
setSpecFile(String specFile)
Sets the generated openApi specification file name.
|
void |
setTitle(String title)
Sets the title for the generated views.
|
String |
toString() |
public static OpenApiViewConfig fromSpecification(String specification, Properties openApiProperties)
specification
- A String representation of an OpenApiViewConfig.openApiProperties
- The open api properties.public boolean isEnabled()
public void render(Path outputDir, io.micronaut.inject.visitor.VisitorContext visitorContext) throws IOException
outputDir
- The destination directory of the generated views.visitorContext
- IOException
- When the generation fails.public String getTitle()
public void setTitle(String title)
title
- A title.public String getSpecURL()
public void setSpecFile(String specFile)
specFile
- The openApi specification file name.