Package io.swagger.codegen
Class AbstractGenerator
- java.lang.Object
-
- io.swagger.codegen.AbstractGenerator
-
- Direct Known Subclasses:
DefaultGenerator,MetaGenerator
public abstract class AbstractGenerator extends Object
-
-
Constructor Summary
Constructors Constructor Description AbstractGenerator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanembeddedTemplateExists(String name)StringgetCPResourcePath(String name)StringgetFullTemplateFile(CodegenConfig config, String templateFile)Get the template file path with template dir prepended, and use the library template if exists.ReadergetTemplateReader(String name)StringreadResourceContents(String resourceFilePath)StringreadTemplate(String name)FilewriteToFile(String filename, String contents)
-
-
-
Method Detail
-
writeToFile
public File writeToFile(String filename, String contents) throws IOException
- Throws:
IOException
-
getFullTemplateFile
public String getFullTemplateFile(CodegenConfig config, String templateFile)
Get the template file path with template dir prepended, and use the library template if exists.- Parameters:
config- Codegen configtemplateFile- Template file- Returns:
- String Full template file path
-
embeddedTemplateExists
public boolean embeddedTemplateExists(String name)
-
-