Class AbstractGenerator

java.lang.Object
io.swagger.codegen.v3.AbstractGenerator
Direct Known Subclasses:
DefaultGenerator, MetaGenerator

public abstract class AbstractGenerator extends Object
  • Constructor Details

    • AbstractGenerator

      public AbstractGenerator()
  • Method Details

    • writeToFile

      public File writeToFile(String filename, String contents) throws IOException
      Throws:
      IOException
    • readTemplate

      public String readTemplate(String name)
    • getTemplateReader

      public Reader getTemplateReader(String name)
    • 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 config
      templateFile - Template file
      Returns:
      String Full template file path
    • readResourceContents

      public String readResourceContents(String resourceFilePath)
    • embeddedTemplateExists

      public boolean embeddedTemplateExists(String name)
    • getCPResourcePath

      public String getCPResourcePath(String name)