Class DefaultGenerator

java.lang.Object
org.openapitools.codegen.DefaultGenerator
All Implemented Interfaces:
org.openapitools.codegen.Generator

public class DefaultGenerator extends Object implements org.openapitools.codegen.Generator
  • Field Details

    • LOGGER

      protected final org.slf4j.Logger LOGGER
    • config

      protected org.openapitools.codegen.CodegenConfig config
    • opts

      protected org.openapitools.codegen.ClientOptInput opts
    • openAPI

      protected io.swagger.v3.oas.models.OpenAPI openAPI
    • ignoreProcessor

      protected org.openapitools.codegen.ignore.CodegenIgnoreProcessor ignoreProcessor
    • templateProcessor

      protected org.openapitools.codegen.api.TemplateProcessor templateProcessor
      Retrieves an instance to the configured template processor, available after user-defined options are applied via
  • Constructor Details

    • DefaultGenerator

      public DefaultGenerator()
    • DefaultGenerator

      public DefaultGenerator(Boolean dryRun)
  • Method Details

    • opts

      public org.openapitools.codegen.Generator opts(org.openapitools.codegen.ClientOptInput opts)
      Specified by:
      opts in interface org.openapitools.codegen.Generator
    • setGenerateMetadata

      public void setGenerateMetadata(Boolean generateMetadata)
      Programmatically disable the output of .openapi-generator/VERSION, .openapi-generator-ignore, or other metadata files used by OpenAPI Generator.
      Parameters:
      generateMetadata - true: enable outputs, false: disable outputs
    • setGeneratorPropertyDefault

      public void setGeneratorPropertyDefault(String key, String value)
      Set generator properties otherwise pulled from system properties. Useful for running tests in parallel without relying on System.properties.
      Parameters:
      key - The system property key
      value - The system property value
    • generate

      public List<File> generate()
      Specified by:
      generate in interface org.openapitools.codegen.Generator
    • processTemplateToFile

      protected File processTemplateToFile(Map<String,Object> templateData, String templateName, String outputFilename, boolean shouldGenerate, String skippedByOption) throws IOException
      Throws:
      IOException
    • processPaths

      public Map<String,List<org.openapitools.codegen.CodegenOperation>> processPaths(io.swagger.v3.oas.models.Paths paths)
    • processAdditionalOperations

      protected void processAdditionalOperations(String resourcePath, String extName, String httpMethod, Map<String,List<org.openapitools.codegen.CodegenOperation>> ops, io.swagger.v3.oas.models.PathItem path)
    • processWebhooks

      public Map<String,List<org.openapitools.codegen.CodegenOperation>> processWebhooks(Map<String,io.swagger.v3.oas.models.PathItem> webhooks)
    • getTemplateProcessor

      public org.openapitools.codegen.api.TemplateProcessor getTemplateProcessor()