diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java index 65b06022d29f..45677bb61e6a 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java @@ -136,6 +136,10 @@ public class DefaultCodegen implements CodegenConfig { protected String modelNamePrefix = "", modelNameSuffix = ""; protected String apiNameSuffix = "Api"; protected String testPackage = ""; + /* + apiTemplateFiles are for API outputs only (controllers/handlers). + API templates may be written multiple times; APIs are grouped by tag and the file is written once per tag group. + */ protected Map apiTemplateFiles = new HashMap(); protected Map modelTemplateFiles = new HashMap(); protected Map apiTestTemplateFiles = new HashMap(); @@ -149,6 +153,11 @@ public class DefaultCodegen implements CodegenConfig { protected Map additionalProperties = new HashMap(); protected Map serverVariables = new HashMap(); protected Map vendorExtensions = new HashMap(); + /* + Supporting files are those which aren't models, APIs, or docs. + These get a different map of data bound to the templates. Supporting files are written once. + See also 'apiTemplateFiles'. + */ protected List supportingFiles = new ArrayList(); protected List cliOptions = new ArrayList(); protected boolean skipOverwrite;