public class DefaultGenerator extends AbstractGenerator implements Generator
| Modifier and Type | Field and Description |
|---|---|
protected CodegenConfig |
config |
protected CodegenIgnoreProcessor |
ignoreProcessor |
protected org.slf4j.Logger |
LOGGER |
protected io.swagger.v3.oas.models.OpenAPI |
openAPI |
protected ClientOptInput |
opts |
protected TemplatingEngineAdapter |
templatingEngine |
| Constructor and Description |
|---|
DefaultGenerator() |
| Modifier and Type | Method and Description |
|---|---|
List<File> |
generate() |
boolean |
getEnableMinimalUpdate()
Is the minimal-file-update option enabled?
|
String |
getFullTemplateContents(String templateName) |
Path |
getFullTemplatePath(String name)
Returns the path of a template, allowing access to the template where consuming literal contents aren't desirable or possible.
|
Generator |
opts(ClientOptInput opts) |
Map<String,List<CodegenOperation>> |
processPaths(io.swagger.v3.oas.models.Paths paths) |
protected File |
processTemplateToFile(Map<String,Object> templateData,
String templateName,
String outputFilename) |
void |
setGenerateMetadata(Boolean generateMetadata)
Programmatically disable the output of .openapi-generator/VERSION, .openapi-generator-ignore,
or other metadata files used by OpenAPI Generator.
|
void |
setGeneratorPropertyDefault(String key,
String value)
Set generator properties otherwise pulled from system properties.
|
protected File |
writeInputStreamToFile(String filename,
InputStream in,
String templateFile) |
embeddedTemplateExists, getCPResourcePath, getFullTemplateFile, getTemplateReader, readResourceContents, readTemplate, writeToFile, writeToFileprotected final org.slf4j.Logger LOGGER
protected CodegenConfig config
protected ClientOptInput opts
protected io.swagger.v3.oas.models.OpenAPI openAPI
protected CodegenIgnoreProcessor ignoreProcessor
protected TemplatingEngineAdapter templatingEngine
public boolean getEnableMinimalUpdate()
AbstractGeneratorgetEnableMinimalUpdate in class AbstractGeneratorpublic Generator opts(ClientOptInput opts)
public void setGenerateMetadata(Boolean generateMetadata)
generateMetadata - true: enable outputs, false: disable outputspublic void setGeneratorPropertyDefault(String key, String value)
key - The system property keyvalue - The system property valueprotected File writeInputStreamToFile(String filename, InputStream in, String templateFile) throws FileNotFoundException, IOException
FileNotFoundExceptionIOExceptionpublic String getFullTemplateContents(String templateName)
getFullTemplateContents in interface TemplatingGeneratorpublic Path getFullTemplatePath(String name)
getFullTemplatePath in interface TemplatingGeneratorname - the template name (e.g. model.mustache)Path to the templateprotected File processTemplateToFile(Map<String,Object> templateData, String templateName, String outputFilename) throws IOException
IOExceptionpublic Map<String,List<CodegenOperation>> processPaths(io.swagger.v3.oas.models.Paths paths)
Copyright © 2019. All rights reserved.