Package org.openapitools.codegen
Class DefaultGenerator
java.lang.Object
org.openapitools.codegen.DefaultGenerator
- All Implemented Interfaces:
org.openapitools.codegen.Generator
-
Field Summary
Modifier and TypeFieldDescriptionprotected org.openapitools.codegen.CodegenConfig
protected org.openapitools.codegen.ignore.CodegenIgnoreProcessor
protected final org.slf4j.Logger
protected io.swagger.v3.oas.models.OpenAPI
protected org.openapitools.codegen.ClientOptInput
protected org.openapitools.codegen.api.TemplateProcessor
Retrieves an instance to the configured template processor, available after user-defined options are applied via -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongenerate()
org.openapitools.codegen.api.TemplateProcessor
org.openapitools.codegen.Generator
opts
(org.openapitools.codegen.ClientOptInput opts) protected void
processAdditionalOperations
(String resourcePath, String extName, String httpMethod, Map<String, List<org.openapitools.codegen.CodegenOperation>> ops, io.swagger.v3.oas.models.PathItem path) processPaths
(io.swagger.v3.oas.models.Paths paths) protected File
processTemplateToFile
(Map<String, Object> templateData, String templateName, String outputFilename, boolean shouldGenerate, String skippedByOption) processWebhooks
(Map<String, io.swagger.v3.oas.models.PathItem> webhooks) 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.
-
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 templateProcessorRetrieves an instance to the configured template processor, available after user-defined options are applied via
-
-
Constructor Details
-
DefaultGenerator
public DefaultGenerator() -
DefaultGenerator
-
-
Method Details
-
opts
public org.openapitools.codegen.Generator opts(org.openapitools.codegen.ClientOptInput opts) - Specified by:
opts
in interfaceorg.openapitools.codegen.Generator
-
setGenerateMetadata
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
Set generator properties otherwise pulled from system properties. Useful for running tests in parallel without relying on System.properties.- Parameters:
key
- The system property keyvalue
- The system property value
-
generate
- Specified by:
generate
in interfaceorg.openapitools.codegen.Generator
-
processTemplateToFile
protected File processTemplateToFile(Map<String, Object> templateData, String templateName, String outputFilename, boolean shouldGenerate, String skippedByOption) throws IOException- Throws:
IOException
-
processPaths
-
processAdditionalOperations
-
processWebhooks
-
getTemplateProcessor
public org.openapitools.codegen.api.TemplateProcessor getTemplateProcessor()
-