Class DefaultCodegenConfig

java.lang.Object
io.swagger.codegen.v3.generators.DefaultCodegenConfig
All Implemented Interfaces:
io.swagger.codegen.v3.CodegenConfig
Direct Known Subclasses:
AbstractCSharpCodegen, AbstractGoCodegen, AbstractJavaCodegen, AbstractKotlinCodegen, AbstractPhpCodegen, AbstractScalaCodegen, AbstractSwiftCodegen, AbstractTypeScriptClientCodegen, DartClientCodegen, JavaScriptClientCodegen, NodeJSServerCodegen, OpenAPIGenerator, PhpClientCodegen, PythonClientCodegen, PythonFlaskConnexionCodegen, RClientCodegen, RubyClientCodegen, StaticDocCodegen, StaticHtml2Codegen, StaticHtmlCodegen, Swift5Codegen

public abstract class DefaultCodegenConfig extends Object implements io.swagger.codegen.v3.CodegenConfig
  • Field Details

    • LOGGER

      protected static final org.slf4j.Logger LOGGER
    • DEFAULT_CONTENT_TYPE

      public static final String DEFAULT_CONTENT_TYPE
      See Also:
    • REQUEST_BODY_NAME

      public static final String REQUEST_BODY_NAME
      See Also:
    • DEFAULT_TEMPLATE_DIR

      public static final String DEFAULT_TEMPLATE_DIR
      See Also:
    • IS_NULLABLE_FALSE

      public static final String IS_NULLABLE_FALSE
      See Also:
    • IS_NULLABLE_TRUE

      public static final String IS_NULLABLE_TRUE
      See Also:
    • openAPI

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

      protected io.swagger.v3.oas.models.OpenAPI unflattenedOpenAPI
    • inputSpec

      protected String inputSpec
    • inputURL

      protected String inputURL
    • outputFolder

      protected String outputFolder
    • defaultIncludes

      protected Set<String> defaultIncludes
    • typeMapping

      protected Map<String,String> typeMapping
    • instantiationTypes

      protected Map<String,String> instantiationTypes
    • reservedWords

      protected Set<String> reservedWords
    • languageSpecificPrimitives

      protected Set<String> languageSpecificPrimitives
    • importMapping

      protected Map<String,String> importMapping
    • modelPackage

      protected String modelPackage
    • apiPackage

      protected String apiPackage
    • fileSuffix

      protected String fileSuffix
    • modelNamePrefix

      protected String modelNamePrefix
    • modelNameSuffix

      protected String modelNameSuffix
    • testPackage

      protected String testPackage
    • apiTemplateFiles

      protected Map<String,String> apiTemplateFiles
    • modelTemplateFiles

      protected Map<String,String> modelTemplateFiles
    • apiTestTemplateFiles

      protected Map<String,String> apiTestTemplateFiles
    • modelTestTemplateFiles

      protected Map<String,String> modelTestTemplateFiles
    • apiDocTemplateFiles

      protected Map<String,String> apiDocTemplateFiles
    • modelDocTemplateFiles

      protected Map<String,String> modelDocTemplateFiles
    • reservedWordsMappings

      protected Map<String,String> reservedWordsMappings
    • templateDir

      protected String templateDir
    • customTemplateDir

      protected String customTemplateDir
    • templateVersion

      protected String templateVersion
    • embeddedTemplateDir

      protected String embeddedTemplateDir
    • commonTemplateDir

      protected String commonTemplateDir
    • additionalProperties

      protected Map<String,Object> additionalProperties
    • vendorExtensions

      protected Map<String,Object> vendorExtensions
    • supportingFiles

      protected List<io.swagger.codegen.v3.SupportingFile> supportingFiles
    • configFiles

      protected List<io.swagger.codegen.v3.SupportingFile> configFiles
    • cliOptions

      protected List<io.swagger.codegen.v3.CliOption> cliOptions
    • languageArguments

      protected List<io.swagger.codegen.v3.CodegenArgument> languageArguments
    • skipOverwrite

      protected boolean skipOverwrite
    • removeOperationIdPrefix

      protected boolean removeOperationIdPrefix
    • supportsInheritance

      protected boolean supportsInheritance
    • supportsMixins

      protected boolean supportsMixins
    • supportedLibraries

      protected Map<String,String> supportedLibraries
    • library

      protected String library
    • sortParamsByRequiredFlag

      protected Boolean sortParamsByRequiredFlag
    • ensureUniqueParams

      protected Boolean ensureUniqueParams
    • allowUnicodeIdentifiers

      protected Boolean allowUnicodeIdentifiers
    • gitUserId

      protected String gitUserId
    • gitRepoId

      protected String gitRepoId
    • releaseNote

      protected String releaseNote
    • gitRepoBaseURL

      protected String gitRepoBaseURL
    • httpUserAgent

      protected String httpUserAgent
    • hideGenerationTimestamp

      protected Boolean hideGenerationTimestamp
    • templateEngine

      protected io.swagger.codegen.v3.templates.TemplateEngine templateEngine
    • specialCharReplacements

      protected Map<String,String> specialCharReplacements
    • typeAliases

      protected Map<String,String> typeAliases
    • ignoreFilePathOverride

      protected String ignoreFilePathOverride
    • useOas2

      protected boolean useOas2
    • ignoreImportMapping

      protected boolean ignoreImportMapping
  • Constructor Details

    • DefaultCodegenConfig

      public DefaultCodegenConfig()
      Default constructor. This method will map between Swagger type and language-specified type, as well as mapping between Swagger type and the corresponding import statement for the language. This will also add some language specified CLI options, if any. returns string presentation of the example path (it's a constructor)
  • Method Details

    • cliOptions

      public List<io.swagger.codegen.v3.CliOption> cliOptions()
      Specified by:
      cliOptions in interface io.swagger.codegen.v3.CodegenConfig
    • processOpts

      public void processOpts()
      Specified by:
      processOpts in interface io.swagger.codegen.v3.CodegenConfig
    • postProcessAllModels

      public Map<String,Object> postProcessAllModels(Map<String,Object> processedModels)
      Specified by:
      postProcessAllModels in interface io.swagger.codegen.v3.CodegenConfig
    • postProcessAllCodegenModels

      protected void postProcessAllCodegenModels(Map<String,io.swagger.codegen.v3.CodegenModel> allModels)
    • fixUpParentAndInterfaces

      protected void fixUpParentAndInterfaces(io.swagger.codegen.v3.CodegenModel codegenModel, Map<String,io.swagger.codegen.v3.CodegenModel> allModels)
      Fix up all parent and interface CodegenModel references.
      Parameters:
      allModels -
    • postProcessModels

      public Map<String,Object> postProcessModels(Map<String,Object> objs)
      Specified by:
      postProcessModels in interface io.swagger.codegen.v3.CodegenConfig
    • postProcessModelsEnum

      public Map<String,Object> postProcessModelsEnum(Map<String,Object> objs)
      post process enum defined in model's properties
      Parameters:
      objs - Map of models
      Returns:
      maps of models with better enum support
    • processModelEnums

      public void processModelEnums(Map<String,Object> objs)
    • isPrimivite

      public boolean isPrimivite(String datatype)
    • updateCodegenModelEnumVars

      protected void updateCodegenModelEnumVars(io.swagger.codegen.v3.CodegenModel codegenModel)
      update codegen property enum with proper naming convention and handling of numbers, special characters
      Parameters:
      codegenModel -
    • findCommonPrefixOfVars

      public String findCommonPrefixOfVars(List<Object> vars)
      Returns the common prefix of variables for enum naming if two or more variables are present.
      Parameters:
      vars - List of variable names
      Returns:
      the common prefix for naming
    • toEnumDefaultValue

      public String toEnumDefaultValue(String value, String datatype)
      Return the enum default value in the language specified format
      Parameters:
      value - enum variable name
      datatype - data type
      Returns:
      the default value for the enum
    • toEnumValue

      public String toEnumValue(String value, String datatype)
      Return the enum value in the language specified format e.g. status becomes "status"
      Parameters:
      value - enum variable name
      datatype - data type
      Returns:
      the sanitized value for enum
    • toEnumVarName

      public String toEnumVarName(String value, String datatype)
      Return the sanitized variable name for enum
      Parameters:
      value - enum variable name
      datatype - data type
      Returns:
      the sanitized variable name for enum
    • postProcessOperations

      public Map<String,Object> postProcessOperations(Map<String,Object> objs)
      Specified by:
      postProcessOperations in interface io.swagger.codegen.v3.CodegenConfig
    • postProcessOperationsWithModels

      public Map<String,Object> postProcessOperationsWithModels(Map<String,Object> objs, List<Object> allModels)
      Specified by:
      postProcessOperationsWithModels in interface io.swagger.codegen.v3.CodegenConfig
    • postProcessSupportingFileData

      public Map<String,Object> postProcessSupportingFileData(Map<String,Object> objs)
      Specified by:
      postProcessSupportingFileData in interface io.swagger.codegen.v3.CodegenConfig
    • postProcessModelProperty

      public void postProcessModelProperty(io.swagger.codegen.v3.CodegenModel model, io.swagger.codegen.v3.CodegenProperty property)
      Specified by:
      postProcessModelProperty in interface io.swagger.codegen.v3.CodegenConfig
    • postProcessParameter

      public void postProcessParameter(io.swagger.codegen.v3.CodegenParameter parameter)
      Specified by:
      postProcessParameter in interface io.swagger.codegen.v3.CodegenConfig
    • preprocessOpenAPI

      public void preprocessOpenAPI(io.swagger.v3.oas.models.OpenAPI openAPI)
      Specified by:
      preprocessOpenAPI in interface io.swagger.codegen.v3.CodegenConfig
    • processOpenAPI

      public void processOpenAPI(io.swagger.v3.oas.models.OpenAPI openAPI)
      Specified by:
      processOpenAPI in interface io.swagger.codegen.v3.CodegenConfig
    • processCompiler

      public com.samskivert.mustache.Mustache.Compiler processCompiler(com.samskivert.mustache.Mustache.Compiler compiler)
      Specified by:
      processCompiler in interface io.swagger.codegen.v3.CodegenConfig
    • getTemplateEngine

      public io.swagger.codegen.v3.templates.TemplateEngine getTemplateEngine()
      Specified by:
      getTemplateEngine in interface io.swagger.codegen.v3.CodegenConfig
    • escapeText

      public String escapeText(String input)
      Specified by:
      escapeText in interface io.swagger.codegen.v3.CodegenConfig
    • escapeUnsafeCharacters

      public String escapeUnsafeCharacters(String input)
      override with any special text escaping logic to handle unsafe characters so as to avoid code injection
      Specified by:
      escapeUnsafeCharacters in interface io.swagger.codegen.v3.CodegenConfig
      Parameters:
      input - String to be cleaned up
      Returns:
      string with unsafe characters removed or escaped
    • escapeQuotationMark

      public String escapeQuotationMark(String input)
      Escape single and/or double quote to avoid code injection
      Specified by:
      escapeQuotationMark in interface io.swagger.codegen.v3.CodegenConfig
      Parameters:
      input - String to be cleaned up
      Returns:
      string with quotation mark removed or escaped
    • defaultIncludes

      public Set<String> defaultIncludes()
      Specified by:
      defaultIncludes in interface io.swagger.codegen.v3.CodegenConfig
    • typeMapping

      public Map<String,String> typeMapping()
      Specified by:
      typeMapping in interface io.swagger.codegen.v3.CodegenConfig
    • instantiationTypes

      public Map<String,String> instantiationTypes()
      Specified by:
      instantiationTypes in interface io.swagger.codegen.v3.CodegenConfig
    • reservedWords

      public Set<String> reservedWords()
      Specified by:
      reservedWords in interface io.swagger.codegen.v3.CodegenConfig
    • languageSpecificPrimitives

      public Set<String> languageSpecificPrimitives()
      Specified by:
      languageSpecificPrimitives in interface io.swagger.codegen.v3.CodegenConfig
    • importMapping

      public Map<String,String> importMapping()
      Specified by:
      importMapping in interface io.swagger.codegen.v3.CodegenConfig
    • testPackage

      public String testPackage()
      Specified by:
      testPackage in interface io.swagger.codegen.v3.CodegenConfig
    • modelPackage

      public String modelPackage()
      Specified by:
      modelPackage in interface io.swagger.codegen.v3.CodegenConfig
    • apiPackage

      public String apiPackage()
      Specified by:
      apiPackage in interface io.swagger.codegen.v3.CodegenConfig
    • fileSuffix

      public String fileSuffix()
      Specified by:
      fileSuffix in interface io.swagger.codegen.v3.CodegenConfig
    • templateDir

      public String templateDir()
      Specified by:
      templateDir in interface io.swagger.codegen.v3.CodegenConfig
    • embeddedTemplateDir

      public String embeddedTemplateDir()
      Specified by:
      embeddedTemplateDir in interface io.swagger.codegen.v3.CodegenConfig
    • customTemplateDir

      public String customTemplateDir()
      Specified by:
      customTemplateDir in interface io.swagger.codegen.v3.CodegenConfig
    • getCommonTemplateDir

      public String getCommonTemplateDir()
      Specified by:
      getCommonTemplateDir in interface io.swagger.codegen.v3.CodegenConfig
    • setCommonTemplateDir

      public void setCommonTemplateDir(String commonTemplateDir)
    • apiDocTemplateFiles

      public Map<String,String> apiDocTemplateFiles()
      Specified by:
      apiDocTemplateFiles in interface io.swagger.codegen.v3.CodegenConfig
    • modelDocTemplateFiles

      public Map<String,String> modelDocTemplateFiles()
      Specified by:
      modelDocTemplateFiles in interface io.swagger.codegen.v3.CodegenConfig
    • reservedWordsMappings

      public Map<String,String> reservedWordsMappings()
      Specified by:
      reservedWordsMappings in interface io.swagger.codegen.v3.CodegenConfig
    • apiTestTemplateFiles

      public Map<String,String> apiTestTemplateFiles()
      Specified by:
      apiTestTemplateFiles in interface io.swagger.codegen.v3.CodegenConfig
    • modelTestTemplateFiles

      public Map<String,String> modelTestTemplateFiles()
      Specified by:
      modelTestTemplateFiles in interface io.swagger.codegen.v3.CodegenConfig
    • apiTemplateFiles

      public Map<String,String> apiTemplateFiles()
      Specified by:
      apiTemplateFiles in interface io.swagger.codegen.v3.CodegenConfig
    • modelTemplateFiles

      public Map<String,String> modelTemplateFiles()
      Specified by:
      modelTemplateFiles in interface io.swagger.codegen.v3.CodegenConfig
    • apiFileFolder

      public String apiFileFolder()
      Specified by:
      apiFileFolder in interface io.swagger.codegen.v3.CodegenConfig
    • modelFileFolder

      public String modelFileFolder()
      Specified by:
      modelFileFolder in interface io.swagger.codegen.v3.CodegenConfig
    • apiTestFileFolder

      public String apiTestFileFolder()
      Specified by:
      apiTestFileFolder in interface io.swagger.codegen.v3.CodegenConfig
    • modelTestFileFolder

      public String modelTestFileFolder()
      Specified by:
      modelTestFileFolder in interface io.swagger.codegen.v3.CodegenConfig
    • apiDocFileFolder

      public String apiDocFileFolder()
      Specified by:
      apiDocFileFolder in interface io.swagger.codegen.v3.CodegenConfig
    • modelDocFileFolder

      public String modelDocFileFolder()
      Specified by:
      modelDocFileFolder in interface io.swagger.codegen.v3.CodegenConfig
    • additionalProperties

      public Map<String,Object> additionalProperties()
      Specified by:
      additionalProperties in interface io.swagger.codegen.v3.CodegenConfig
    • vendorExtensions

      public Map<String,Object> vendorExtensions()
      Specified by:
      vendorExtensions in interface io.swagger.codegen.v3.CodegenConfig
    • supportingFiles

      public List<io.swagger.codegen.v3.SupportingFile> supportingFiles()
      Specified by:
      supportingFiles in interface io.swagger.codegen.v3.CodegenConfig
    • configFiles

      public List<io.swagger.codegen.v3.SupportingFile> configFiles()
      Specified by:
      configFiles in interface io.swagger.codegen.v3.CodegenConfig
    • outputFolder

      public String outputFolder()
      Specified by:
      outputFolder in interface io.swagger.codegen.v3.CodegenConfig
    • setOutputDir

      public void setOutputDir(String dir)
      Specified by:
      setOutputDir in interface io.swagger.codegen.v3.CodegenConfig
    • getOutputDir

      public String getOutputDir()
      Specified by:
      getOutputDir in interface io.swagger.codegen.v3.CodegenConfig
    • getInputSpec

      public String getInputSpec()
      Specified by:
      getInputSpec in interface io.swagger.codegen.v3.CodegenConfig
    • setInputSpec

      public void setInputSpec(String inputSpec)
      Specified by:
      setInputSpec in interface io.swagger.codegen.v3.CodegenConfig
    • getInputURL

      public String getInputURL()
      Specified by:
      getInputURL in interface io.swagger.codegen.v3.CodegenConfig
    • setInputURL

      public void setInputURL(String inputURL)
      Specified by:
      setInputURL in interface io.swagger.codegen.v3.CodegenConfig
    • setTemplateDir

      public void setTemplateDir(String templateDir)
    • getTemplateVersion

      public String getTemplateVersion()
      Specified by:
      getTemplateVersion in interface io.swagger.codegen.v3.CodegenConfig
    • setTemplateVersion

      public void setTemplateVersion(String templateVersion)
    • setModelPackage

      public void setModelPackage(String modelPackage)
    • setModelNamePrefix

      public void setModelNamePrefix(String modelNamePrefix)
    • setModelNameSuffix

      public void setModelNameSuffix(String modelNameSuffix)
    • setApiPackage

      public void setApiPackage(String apiPackage)
    • getSortParamsByRequiredFlag

      public Boolean getSortParamsByRequiredFlag()
    • setSortParamsByRequiredFlag

      public void setSortParamsByRequiredFlag(Boolean sortParamsByRequiredFlag)
    • setEnsureUniqueParams

      public void setEnsureUniqueParams(Boolean ensureUniqueParams)
    • setAllowUnicodeIdentifiers

      public void setAllowUnicodeIdentifiers(Boolean allowUnicodeIdentifiers)
    • toRegularExpression

      public String toRegularExpression(String pattern)
      Return the regular expression/JSON schema pattern (http://json-schema.org/latest/json-schema-validation.html#anchor33)
      Parameters:
      pattern - the pattern (regular expression)
      Returns:
      properly-escaped pattern
    • toApiFilename

      public String toApiFilename(String name)
      Return the file name of the Api Test
      Specified by:
      toApiFilename in interface io.swagger.codegen.v3.CodegenConfig
      Parameters:
      name - the file name of the Api
      Returns:
      the file name of the Api
    • toApiDocFilename

      public String toApiDocFilename(String name)
      Return the file name of the Api Documentation
      Specified by:
      toApiDocFilename in interface io.swagger.codegen.v3.CodegenConfig
      Parameters:
      name - the file name of the Api
      Returns:
      the file name of the Api
    • toApiTestFilename

      public String toApiTestFilename(String name)
      Return the file name of the Api Test
      Specified by:
      toApiTestFilename in interface io.swagger.codegen.v3.CodegenConfig
      Parameters:
      name - the file name of the Api
      Returns:
      the file name of the Api
    • toApiVarName

      public String toApiVarName(String name)
      Return the variable name in the Api
      Specified by:
      toApiVarName in interface io.swagger.codegen.v3.CodegenConfig
      Parameters:
      name - the varible name of the Api
      Returns:
      the snake-cased variable name
    • toModelFilename

      public String toModelFilename(String name)
      Return the capitalized file name of the model
      Specified by:
      toModelFilename in interface io.swagger.codegen.v3.CodegenConfig
      Parameters:
      name - the model name
      Returns:
      the file name of the model
    • toModelTestFilename

      public String toModelTestFilename(String name)
      Return the capitalized file name of the model test
      Specified by:
      toModelTestFilename in interface io.swagger.codegen.v3.CodegenConfig
      Parameters:
      name - the model name
      Returns:
      the file name of the model
    • toModelDocFilename

      public String toModelDocFilename(String name)
      Return the capitalized file name of the model documentation
      Specified by:
      toModelDocFilename in interface io.swagger.codegen.v3.CodegenConfig
      Parameters:
      name - the model name
      Returns:
      the file name of the model
    • toOperationId

      public String toOperationId(String operationId)
      Return the operation ID (method name)
      Parameters:
      operationId - operation ID
      Returns:
      the sanitized method name
    • toVarName

      public String toVarName(String name)
      Return the variable name by removing invalid characters and proper escaping if it's a reserved word.
      Parameters:
      name - the variable name
      Returns:
      the sanitized variable name
    • toParamName

      public String toParamName(String name)
      Return the parameter name by removing invalid characters and proper escaping if it's a reserved word.
      Specified by:
      toParamName in interface io.swagger.codegen.v3.CodegenConfig
      Parameters:
      name - Codegen property object
      Returns:
      the sanitized parameter name
    • toEnumName

      public String toEnumName(io.swagger.codegen.v3.CodegenProperty property)
      Return the Enum name (e.g. StatusEnum given 'status')
      Parameters:
      property - Codegen property
      Returns:
      the Enum name
    • escapeReservedWord

      public String escapeReservedWord(String name)
      Return the escaped name of the reserved word
      Specified by:
      escapeReservedWord in interface io.swagger.codegen.v3.CodegenConfig
      Parameters:
      name - the name to be escaped
      Returns:
      the escaped reserved word throws Runtime exception as reserved word is not allowed (default behavior)
    • toModelImport

      public String toModelImport(String name)
      Return the fully-qualified "Model" name for import
      Specified by:
      toModelImport in interface io.swagger.codegen.v3.CodegenConfig
      Parameters:
      name - the name of the "Model"
      Returns:
      the fully-qualified "Model" name for import
    • toApiImport

      public String toApiImport(String name)
      Return the fully-qualified "Api" name for import
      Specified by:
      toApiImport in interface io.swagger.codegen.v3.CodegenConfig
      Parameters:
      name - the name of the "Api"
      Returns:
      the fully-qualified "Api" name for import
    • getSymbolName

      protected String getSymbolName(String input)
      Return the symbol name of a symbol
      Parameters:
      input - Symbol (e.g. $)
      Returns:
      Symbol name (e.g. Dollar)
    • generateExamplePath

      public String generateExamplePath(String path, io.swagger.v3.oas.models.Operation operation)
      Return the example path
      Specified by:
      generateExamplePath in interface io.swagger.codegen.v3.CodegenConfig
      Parameters:
      path - the path of the operation
      operation - Swagger operation object
      Returns:
      string presentation of the example path
    • toInstantiationType

      public String toInstantiationType(io.swagger.v3.oas.models.media.Schema property)
      Return the instantiation type of the property, especially for map and array
      Parameters:
      property - Swagger property object
      Returns:
      string presentation of the instantiation type of the property
    • setParameterExampleValue

      public void setParameterExampleValue(io.swagger.codegen.v3.CodegenParameter p)
      Return the example value of the parameter.
      Parameters:
      p - Swagger property object
    • toExampleValue

      public String toExampleValue(io.swagger.v3.oas.models.media.Schema property)
      Return the example value of the property
      Parameters:
      property - Schema property object
      Returns:
      string presentation of the example value of the property
    • toDefaultValue

      public String toDefaultValue(io.swagger.v3.oas.models.media.Schema property)
      Return the default value of the property
      Parameters:
      property - Schema property object
      Returns:
      string presentation of the default value of the property
    • toDefaultValueWithParam

      public String toDefaultValueWithParam(String name, io.swagger.v3.oas.models.media.Schema property)
      Return the property initialized from a data object Useful for initialization with a plain object in Javascript
      Parameters:
      name - Name of the property object
      property - openAPI schema object
      Returns:
      string presentation of the default value of the property
    • getSchemaType

      public String getSchemaType(io.swagger.v3.oas.models.media.Schema property)
      returns the swagger type for the property
      Parameters:
      property - Schema property object
      Returns:
      string presentation of the type
    • snakeCase

      public String snakeCase(String name)
      Return the snake-case of the string
      Parameters:
      name - string to be snake-cased
      Returns:
      snake-cased string
    • initialCaps

      public String initialCaps(String name)
      Capitalize the string
      Parameters:
      name - string to be capitalized
      Returns:
      capitalized string
    • getTypeDeclaration

      public String getTypeDeclaration(String name)
      Output the type declaration of a given name
      Specified by:
      getTypeDeclaration in interface io.swagger.codegen.v3.CodegenConfig
      Parameters:
      name - name
      Returns:
      a string presentation of the type
    • getTypeDeclaration

      public String getTypeDeclaration(io.swagger.v3.oas.models.media.Schema schema)
      Output the type declaration of the property
      Specified by:
      getTypeDeclaration in interface io.swagger.codegen.v3.CodegenConfig
      Parameters:
      schema - Schema Property object
      Returns:
      a string presentation of the property type
    • getAlias

      public String getAlias(String name)
      Determine the type alias for the given type if it exists. This feature is only used for Java, because the language does not have a aliasing mechanism of its own.
      Parameters:
      name - The type name.
      Returns:
      The alias of the given type, if it exists. If there is no alias for this type, then returns the input type name.
    • toBooleanGetter

      public String toBooleanGetter(String name)
      Output the Getter name for boolean property, e.g. getActive
      Specified by:
      toBooleanGetter in interface io.swagger.codegen.v3.CodegenConfig
      Parameters:
      name - the name of the property
      Returns:
      getter name based on naming convention
    • toGetter

      public String toGetter(String name)
      Output the Getter name, e.g. getSize
      Specified by:
      toGetter in interface io.swagger.codegen.v3.CodegenConfig
      Parameters:
      name - the name of the property
      Returns:
      getter name based on naming convention
    • toSetter

      public String toSetter(String name)
      Output the Getter name, e.g. getSize
      Specified by:
      toSetter in interface io.swagger.codegen.v3.CodegenConfig
      Parameters:
      name - the name of the property
      Returns:
      setter name based on naming convention
    • toApiName

      public String toApiName(String name)
      Output the API (class) name (capitalized) ending with "Api" Return DefaultApi if name is empty
      Specified by:
      toApiName in interface io.swagger.codegen.v3.CodegenConfig
      Parameters:
      name - the name of the Api
      Returns:
      capitalized Api name ending with "Api"
    • toModelName

      public String toModelName(String name)
      Output the proper model name (capitalized). In case the name belongs to the TypeSystem it won't be renamed.
      Specified by:
      toModelName in interface io.swagger.codegen.v3.CodegenConfig
      Parameters:
      name - the name of the model
      Returns:
      capitalized model name
    • fromModel

      public io.swagger.codegen.v3.CodegenModel fromModel(String name, io.swagger.v3.oas.models.media.Schema schema)
      Convert Swagger Model object to Codegen Model object without providing all model definitions
      Specified by:
      fromModel in interface io.swagger.codegen.v3.CodegenConfig
      Parameters:
      name - the name of the model
      schema - Schema object
      Returns:
      Codegen Model object
    • fromModel

      public io.swagger.codegen.v3.CodegenModel fromModel(String name, io.swagger.v3.oas.models.media.Schema schema, Map<String,io.swagger.v3.oas.models.media.Schema> allDefinitions)
      Convert Swagger Model object to Codegen Model object
      Specified by:
      fromModel in interface io.swagger.codegen.v3.CodegenConfig
      Parameters:
      name - the name of the model
      schema - Swagger Model object
      allDefinitions - a map of all Swagger models from the spec
      Returns:
      Codegen Model object
    • copyFirstAllOfProperties

      protected boolean copyFirstAllOfProperties(io.swagger.v3.oas.models.media.Schema allOfSchema)
    • processMapSchema

      protected void processMapSchema(io.swagger.codegen.v3.CodegenModel codegenModel, String name, io.swagger.v3.oas.models.media.Schema schema)
    • addAdditionPropertiesToCodeGenModel

      protected void addAdditionPropertiesToCodeGenModel(io.swagger.codegen.v3.CodegenModel codegenModel, io.swagger.v3.oas.models.media.Schema schema)
    • addProperties

      protected void addProperties(Map<String,io.swagger.v3.oas.models.media.Schema> properties, List<String> required, io.swagger.v3.oas.models.media.Schema schema, Map<String,io.swagger.v3.oas.models.media.Schema> allSchemas)
    • getterAndSetterCapitalize

      public String getterAndSetterCapitalize(String name)
      Camelize the method name of the getter and setter
      Parameters:
      name - string to be camelized
      Returns:
      Camelized string
    • fromProperty

      public io.swagger.codegen.v3.CodegenProperty fromProperty(String name, io.swagger.v3.oas.models.media.Schema propertySchema)
      Convert Swagger Property object to Codegen Property object
      Parameters:
      name - name of the property
      propertySchema - Schema object
      Returns:
      Codegen Property object TODO : improve repeated code
    • setSchemaProperties

      protected void setSchemaProperties(String name, io.swagger.codegen.v3.CodegenProperty codegenProperty, io.swagger.v3.oas.models.media.Schema schema)
    • processPropertySchemaTypes

      protected void processPropertySchemaTypes(String name, io.swagger.codegen.v3.CodegenProperty codegenProperty, io.swagger.v3.oas.models.media.Schema propertySchema)
    • processPropertySchemaContainerTypes

      protected void processPropertySchemaContainerTypes(io.swagger.codegen.v3.CodegenProperty codegenProperty, io.swagger.v3.oas.models.media.Schema propertySchema, String type)
    • updatePropertyForArray

      protected void updatePropertyForArray(io.swagger.codegen.v3.CodegenProperty property, io.swagger.codegen.v3.CodegenProperty innerProperty)
      Update property for array(list) container
      Parameters:
      property - Codegen property
      innerProperty - Codegen inner property of map or list
    • updatePropertyForMap

      protected void updatePropertyForMap(io.swagger.codegen.v3.CodegenProperty property, io.swagger.codegen.v3.CodegenProperty innerProperty)
      Update property for map container
      Parameters:
      property - Codegen property
      innerProperty - Codegen inner property of map or list
    • isPropertyInnerMostEnum

      protected Boolean isPropertyInnerMostEnum(io.swagger.codegen.v3.CodegenProperty property)
      Update property for map container
      Parameters:
      property - Codegen property
      Returns:
      True if the inner most type is enum
    • getInnerEnumAllowableValues

      protected Map<String,Object> getInnerEnumAllowableValues(io.swagger.codegen.v3.CodegenProperty property)
    • updateDataTypeWithEnumForArray

      protected void updateDataTypeWithEnumForArray(io.swagger.codegen.v3.CodegenProperty property)
      Update datatypeWithEnum for array container
      Parameters:
      property - Codegen property
    • updateDataTypeWithEnumForMap

      protected void updateDataTypeWithEnumForMap(io.swagger.codegen.v3.CodegenProperty property)
      Update datatypeWithEnum for map container
      Parameters:
      property - Codegen property
    • setNonArrayMapProperty

      protected void setNonArrayMapProperty(io.swagger.codegen.v3.CodegenProperty property, String type)
    • findMethodResponse

      protected io.swagger.v3.oas.models.responses.ApiResponse findMethodResponse(io.swagger.v3.oas.models.responses.ApiResponses responses)
      Override with any special handling of response codes
      Parameters:
      responses - Swagger Operation's responses
      Returns:
      default method response or null if not found
    • fromOperation

      public io.swagger.codegen.v3.CodegenOperation fromOperation(String path, String httpMethod, io.swagger.v3.oas.models.Operation operation, Map<String,io.swagger.v3.oas.models.media.Schema> schemas)
      Convert Swagger Operation object to Codegen Operation object (without providing a Swagger object)
      Specified by:
      fromOperation in interface io.swagger.codegen.v3.CodegenConfig
      Parameters:
      path - the path of the operation
      httpMethod - HTTP method
      operation - Swagger operation object
      schemas - a map of Swagger models
      Returns:
      Codegen Operation object
    • fromOperation

      public io.swagger.codegen.v3.CodegenOperation fromOperation(String path, String httpMethod, io.swagger.v3.oas.models.Operation operation, Map<String,io.swagger.v3.oas.models.media.Schema> schemas, io.swagger.v3.oas.models.OpenAPI openAPI)
      Convert Swagger Operation object to Codegen Operation object
      Specified by:
      fromOperation in interface io.swagger.codegen.v3.CodegenConfig
      Parameters:
      path - the path of the operation
      httpMethod - HTTP method
      operation - Swagger operation object
      schemas - a map of schemas
      openAPI - a OpenAPI object representing the spec
      Returns:
      Codegen Operation object
    • addOperationImports

      protected void addOperationImports(io.swagger.codegen.v3.CodegenOperation codegenOperation, Set<String> operationImports)
    • fromResponse

      public io.swagger.codegen.v3.CodegenResponse fromResponse(String responseCode, io.swagger.v3.oas.models.responses.ApiResponse response)
      Convert Swagger Response object to Codegen Response object
      Parameters:
      responseCode - HTTP response code
      response - Swagger Response object
      Returns:
      Codegen Response object
    • fromParameter

      public io.swagger.codegen.v3.CodegenParameter fromParameter(io.swagger.v3.oas.models.parameters.Parameter parameter, Set<String> imports)
      Convert Swagger Parameter object to Codegen Parameter object
      Parameters:
      parameter - Swagger parameter object
      imports - set of imports for library/package/module
      Returns:
      Codegen Parameter object
    • fromRequestBody

      public io.swagger.codegen.v3.CodegenParameter fromRequestBody(io.swagger.v3.oas.models.parameters.RequestBody body, String name, io.swagger.v3.oas.models.media.Schema schema, Map<String,io.swagger.v3.oas.models.media.Schema> schemas, Set<String> imports)
    • isDataTypeBinary

      public boolean isDataTypeBinary(String dataType)
    • isDataTypeFile

      public boolean isDataTypeFile(String dataType)
    • fromSecurity

      public List<io.swagger.codegen.v3.CodegenSecurity> fromSecurity(Map<String,io.swagger.v3.oas.models.security.SecurityScheme> securitySchemeMap)
      Convert map of Swagger SecurityScheme objects to a list of Codegen Security objects
      Specified by:
      fromSecurity in interface io.swagger.codegen.v3.CodegenConfig
      Parameters:
      securitySchemeMap - a map of Swagger SecuritySchemeDefinition object
      Returns:
      a list of Codegen Security objects
    • setReservedWordsLowerCase

      protected void setReservedWordsLowerCase(List<String> words)
    • setReservedWords

      protected void setReservedWords(List<String> words)
    • isReservedWord

      protected boolean isReservedWord(String word)
    • getOrGenerateOperationId

      protected String getOrGenerateOperationId(io.swagger.v3.oas.models.Operation operation, String path, String httpMethod)
      Get operationId from the operation object, and if it's blank, generate a new one from the given parameters.
      Parameters:
      operation - the operation object
      path - the path of the operation
      httpMethod - the HTTP method of the operation
      Returns:
      the (generated) operationId
    • needToImport

      protected boolean needToImport(String type)
      Check the type to see if it needs import the library/module/package
      Parameters:
      type - name of the type
      Returns:
      true if the library/module/package of the corresponding type needs to be imported
    • toExamples

      protected List<Map<String,Object>> toExamples(Map<String,Object> examples)
    • addOperationToGroup

      public void addOperationToGroup(String tag, String resourcePath, io.swagger.v3.oas.models.Operation operation, io.swagger.codegen.v3.CodegenOperation co, Map<String,List<io.swagger.codegen.v3.CodegenOperation>> operations)
      Add operation to group
      Specified by:
      addOperationToGroup in interface io.swagger.codegen.v3.CodegenConfig
      Parameters:
      tag - name of the tag
      resourcePath - path of the resource
      operation - Swagger Operation object
      co - Codegen Operation object
      operations - map of Codegen operations
    • addParentContainer

      public void addParentContainer(io.swagger.codegen.v3.CodegenModel codegenModel, String name, io.swagger.v3.oas.models.media.Schema schema)
    • underscore

      public static String underscore(String word)
      Underscore the given word. Copied from Twitter elephant bird https://github.com/twitter/elephant-bird/blob/master/core/src/main/java/com/twitter/elephantbird/util/Strings.java
      Parameters:
      word - The word
      Returns:
      The underscored version of the word
    • dashize

      protected String dashize(String word)
      Dashize the given word.
      Parameters:
      word - The word
      Returns:
      The dashized version of the word, e.g. "my-name"
    • addImport

      protected void addImport(io.swagger.codegen.v3.CodegenModel m, String type)
    • addVars

      protected void addVars(io.swagger.codegen.v3.CodegenModel codegenModel, Map<String,io.swagger.v3.oas.models.media.Schema> properties, List<String> required)
    • removeNonNameElementToCamelCase

      public String removeNonNameElementToCamelCase(String name)
      Remove characters not suitable for variable or method name from the input and camelize it
      Parameters:
      name - string to be camelize
      Returns:
      camelized string
    • removeNonNameElementToCamelCase

      protected String removeNonNameElementToCamelCase(String name, String nonNameElementPattern)
      Remove characters that is not good to be included in method name from the input and camelize it
      Parameters:
      name - string to be camelize
      nonNameElementPattern - a regex pattern of the characters that is not good to be included in name
      Returns:
      camelized string
    • camelize

      public static String camelize(String word)
      Camelize name (parameter, property, method, etc) with upper case for first letter copied from Twitter elephant bird https://github.com/twitter/elephant-bird/blob/master/core/src/main/java/com/twitter/elephantbird/util/Strings.java
      Parameters:
      word - string to be camelize
      Returns:
      camelized string
    • camelize

      public static String camelize(String word, boolean lowercaseFirstLetter)
      Camelize name (parameter, property, method, etc)
      Parameters:
      word - string to be camelize
      lowercaseFirstLetter - lower case for first letter if set to true
      Returns:
      camelized string
    • apiFilename

      public String apiFilename(String templateName, String tag)
      Specified by:
      apiFilename in interface io.swagger.codegen.v3.CodegenConfig
    • apiDocFilename

      public String apiDocFilename(String templateName, String tag)
      Return the full path and API documentation file
      Specified by:
      apiDocFilename in interface io.swagger.codegen.v3.CodegenConfig
      Parameters:
      templateName - template name
      tag - tag
      Returns:
      the API documentation file name with full path
    • apiTestFilename

      public String apiTestFilename(String templateName, String tag)
      Return the full path and API test file
      Specified by:
      apiTestFilename in interface io.swagger.codegen.v3.CodegenConfig
      Parameters:
      templateName - template name
      tag - tag
      Returns:
      the API test file name with full path
    • shouldOverwrite

      public boolean shouldOverwrite(String filename)
      Specified by:
      shouldOverwrite in interface io.swagger.codegen.v3.CodegenConfig
    • isSkipOverwrite

      public boolean isSkipOverwrite()
      Specified by:
      isSkipOverwrite in interface io.swagger.codegen.v3.CodegenConfig
    • setSkipOverwrite

      public void setSkipOverwrite(boolean skipOverwrite)
      Specified by:
      setSkipOverwrite in interface io.swagger.codegen.v3.CodegenConfig
    • isRemoveOperationIdPrefix

      public boolean isRemoveOperationIdPrefix()
      Specified by:
      isRemoveOperationIdPrefix in interface io.swagger.codegen.v3.CodegenConfig
    • setRemoveOperationIdPrefix

      public void setRemoveOperationIdPrefix(boolean removeOperationIdPrefix)
      Specified by:
      setRemoveOperationIdPrefix in interface io.swagger.codegen.v3.CodegenConfig
    • supportedLibraries

      public Map<String,String> supportedLibraries()
      All library languages supported. (key: library name, value: library description)
      Specified by:
      supportedLibraries in interface io.swagger.codegen.v3.CodegenConfig
      Returns:
      the supported libraries
    • setLibrary

      public void setLibrary(String library)
      Set library template (sub-template).
      Specified by:
      setLibrary in interface io.swagger.codegen.v3.CodegenConfig
      Parameters:
      library - Library template
    • getLibrary

      public String getLibrary()
      Library template (sub-template).
      Specified by:
      getLibrary in interface io.swagger.codegen.v3.CodegenConfig
      Returns:
      Library template
    • setGitUserId

      public void setGitUserId(String gitUserId)
      Set Git user ID.
      Specified by:
      setGitUserId in interface io.swagger.codegen.v3.CodegenConfig
      Parameters:
      gitUserId - Git user ID
    • getGitUserId

      public String getGitUserId()
      Git user ID
      Specified by:
      getGitUserId in interface io.swagger.codegen.v3.CodegenConfig
      Returns:
      Git user ID
    • setGitRepoId

      public void setGitRepoId(String gitRepoId)
      Set Git repo ID.
      Specified by:
      setGitRepoId in interface io.swagger.codegen.v3.CodegenConfig
      Parameters:
      gitRepoId - Git repo ID
    • getGitRepoId

      public String getGitRepoId()
      Git repo ID
      Specified by:
      getGitRepoId in interface io.swagger.codegen.v3.CodegenConfig
      Returns:
      Git repo ID
    • getGitRepoBaseURL

      public String getGitRepoBaseURL()
      Git repo Base URL
      Specified by:
      getGitRepoBaseURL in interface io.swagger.codegen.v3.CodegenConfig
      Returns:
      Git repo Base URL
    • setGitRepoBaseURL

      public void setGitRepoBaseURL(String gitRepoBaseURL)
      Set Git repo Base URL.
      Specified by:
      setGitRepoBaseURL in interface io.swagger.codegen.v3.CodegenConfig
      Parameters:
      gitRepoBaseURL - Git repo Base URL
    • setReleaseNote

      public void setReleaseNote(String releaseNote)
      Set release note.
      Specified by:
      setReleaseNote in interface io.swagger.codegen.v3.CodegenConfig
      Parameters:
      releaseNote - Release note
    • getReleaseNote

      public String getReleaseNote()
      Release note
      Specified by:
      getReleaseNote in interface io.swagger.codegen.v3.CodegenConfig
      Returns:
      Release note
    • setHttpUserAgent

      public void setHttpUserAgent(String httpUserAgent)
      Set HTTP user agent.
      Specified by:
      setHttpUserAgent in interface io.swagger.codegen.v3.CodegenConfig
      Parameters:
      httpUserAgent - HTTP user agent
    • getHttpUserAgent

      public String getHttpUserAgent()
      HTTP user agent
      Specified by:
      getHttpUserAgent in interface io.swagger.codegen.v3.CodegenConfig
      Returns:
      HTTP user agent
    • setHideGenerationTimestamp

      public void setHideGenerationTimestamp(Boolean hideGenerationTimestamp)
      Hide generation timestamp
      Parameters:
      hideGenerationTimestamp - flag to indicates if the generation timestamp should be hidden or not
    • getHideGenerationTimestamp

      public Boolean getHideGenerationTimestamp()
      Hide generation timestamp
      Returns:
      if the generation timestamp should be hidden or not
    • buildLibraryCliOption

      protected io.swagger.codegen.v3.CliOption buildLibraryCliOption(Map<String,String> supportedLibraries)
    • sanitizeName

      public String sanitizeName(String name)
      Sanitize name (parameter, property, method, etc)
      Specified by:
      sanitizeName in interface io.swagger.codegen.v3.CodegenConfig
      Parameters:
      name - string to be sanitize
      Returns:
      sanitized string
    • sanitizeTag

      public String sanitizeTag(String tag)
      Sanitize tag
      Specified by:
      sanitizeTag in interface io.swagger.codegen.v3.CodegenConfig
      Parameters:
      tag - Tag
      Returns:
      Sanitized tag
    • addHandlebarHelpers

      public void addHandlebarHelpers(com.github.jknack.handlebars.Handlebars handlebars)
      Specified by:
      addHandlebarHelpers in interface io.swagger.codegen.v3.CodegenConfig
    • readLanguageArguments

      public List<io.swagger.codegen.v3.CodegenArgument> readLanguageArguments()
      Specified by:
      readLanguageArguments in interface io.swagger.codegen.v3.CodegenConfig
    • setLanguageArguments

      public void setLanguageArguments(List<io.swagger.codegen.v3.CodegenArgument> languageArguments)
      Specified by:
      setLanguageArguments in interface io.swagger.codegen.v3.CodegenConfig
    • getLanguageArguments

      public List<io.swagger.codegen.v3.CodegenArgument> getLanguageArguments()
      Specified by:
      getLanguageArguments in interface io.swagger.codegen.v3.CodegenConfig
    • getArgumentsLocation

      public String getArgumentsLocation()
    • getOptionValue

      protected String getOptionValue(String optionName)
    • writeOptional

      public void writeOptional(String outputFolder, io.swagger.codegen.v3.SupportingFile supportingFile)
    • writeOptional

      public void writeOptional(String outputFolder, io.swagger.codegen.v3.SupportingFile supportingFile, boolean configFile)
      Only write if the file doesn't exist
      Parameters:
      outputFolder - Output folder
      supportingFile - Supporting file
    • setParameterBooleanFlagWithCodegenProperty

      public void setParameterBooleanFlagWithCodegenProperty(io.swagger.codegen.v3.CodegenParameter parameter, io.swagger.codegen.v3.CodegenProperty property)
      Set CodegenParameter boolean flag using CodegenProperty.
      Parameters:
      parameter - Codegen Parameter
      property - Codegen property
    • updateCodegenPropertyEnum

      public void updateCodegenPropertyEnum(io.swagger.codegen.v3.CodegenProperty var)
      Update codegen property's enum by adding "enumVars" (with name and value)
      Parameters:
      var - list of CodegenProperty
    • addRegularExpressionDelimiter

      public String addRegularExpressionDelimiter(String pattern)
      If the pattern misses the delimiter, add "/" to the beginning and end Otherwise, return the original pattern
      Parameters:
      pattern - the pattern (regular expression)
      Returns:
      the pattern with delimiter
    • convertPropertyToBooleanAndWriteBack

      public boolean convertPropertyToBooleanAndWriteBack(String propertyKey)
      reads propertyKey from additionalProperties, converts it to a boolean and writes it back to additionalProperties to be usable as a boolean in mustache files.
      Parameters:
      propertyKey - property key
      Returns:
      property value as boolean
    • getIgnoreFilePathOverride

      public String getIgnoreFilePathOverride()
      Provides an override location, if any is specified, for the .swagger-codegen-ignore. This is originally intended for the first generation only.
      Specified by:
      getIgnoreFilePathOverride in interface io.swagger.codegen.v3.CodegenConfig
      Returns:
      a string of the full path to an override ignore file.
    • setIgnoreFilePathOverride

      public void setIgnoreFilePathOverride(String ignoreFileOverride)
      Sets an override location for the .swagger-codegen.ignore location for the first code generation.
      Specified by:
      setIgnoreFilePathOverride in interface io.swagger.codegen.v3.CodegenConfig
      Parameters:
      ignoreFileOverride - The full path to an ignore file
    • setUseOas2

      public void setUseOas2(boolean useOas2)
    • getDefaultTemplateDir

      public abstract String getDefaultTemplateDir()
    • convertPropertyToBoolean

      public boolean convertPropertyToBoolean(String propertyKey)
    • writePropertyBack

      public void writePropertyBack(String propertyKey, boolean value)
    • addOption

      protected void addOption(String key, String description)
    • addOption

      protected void addOption(String key, String description, String defaultValue)
    • addSwitch

      protected void addSwitch(String key, String description, Boolean defaultValue)
    • getContentType

      protected String getContentType(io.swagger.v3.oas.models.parameters.RequestBody requestBody)
    • getSchemaFromBody

      protected io.swagger.v3.oas.models.media.Schema getSchemaFromBody(io.swagger.v3.oas.models.parameters.RequestBody requestBody)
    • getSchemaFromResponse

      protected io.swagger.v3.oas.models.media.Schema getSchemaFromResponse(io.swagger.v3.oas.models.responses.ApiResponse response)
    • getSchemaFromParameter

      protected io.swagger.v3.oas.models.media.Schema getSchemaFromParameter(io.swagger.v3.oas.models.parameters.Parameter parameter)
    • getParameterFromRef

      protected io.swagger.v3.oas.models.parameters.Parameter getParameterFromRef(String ref, io.swagger.v3.oas.models.OpenAPI openAPI)
    • setTemplateEngine

      protected void setTemplateEngine()
    • getTemplateDir

      protected String getTemplateDir()
    • addConsumesInfo

      protected void addConsumesInfo(io.swagger.v3.oas.models.Operation operation, io.swagger.codegen.v3.CodegenOperation codegenOperation, io.swagger.v3.oas.models.OpenAPI openAPI)
    • configureDataForTestTemplate

      protected void configureDataForTestTemplate(io.swagger.codegen.v3.CodegenOperation codegenOperation)
    • getConsumesInfo

      protected Set<String> getConsumesInfo(io.swagger.v3.oas.models.Operation operation)
    • addProducesInfo

      protected void addProducesInfo(io.swagger.v3.oas.models.responses.ApiResponse response, io.swagger.codegen.v3.CodegenOperation codegenOperation)
    • getProducesInfo

      protected Set<String> getProducesInfo(io.swagger.v3.oas.models.Operation operation)
    • detectParent

      protected io.swagger.v3.oas.models.media.Schema detectParent(io.swagger.v3.oas.models.media.ComposedSchema composedSchema, Map<String,io.swagger.v3.oas.models.media.Schema> allSchemas)
    • getParentName

      protected String getParentName(io.swagger.v3.oas.models.media.ComposedSchema composedSchema)
    • getCollectionFormat

      protected String getCollectionFormat(io.swagger.v3.oas.models.parameters.Parameter parameter)
    • isObjectSchema

      public boolean isObjectSchema(io.swagger.v3.oas.models.media.Schema schema)
    • hasSchemaProperties

      protected static boolean hasSchemaProperties(io.swagger.v3.oas.models.media.Schema schema)
    • hasTrueAdditionalProperties

      protected static boolean hasTrueAdditionalProperties(io.swagger.v3.oas.models.media.Schema schema)
    • configuresParameterForMediaType

      protected void configuresParameterForMediaType(io.swagger.codegen.v3.CodegenOperation codegenOperation, List<io.swagger.codegen.v3.CodegenContent> codegenContents)
    • addParameters

      protected void addParameters(io.swagger.codegen.v3.CodegenContent codegenContent, List<io.swagger.codegen.v3.CodegenParameter> codegenParameters)
    • addCodegenContentParameters

      protected void addCodegenContentParameters(io.swagger.codegen.v3.CodegenOperation codegenOperation, List<io.swagger.codegen.v3.CodegenContent> codegenContents)
    • ensureUniqueParameters

      protected void ensureUniqueParameters(List<io.swagger.codegen.v3.CodegenParameter> codegenParameters)
    • setParameterNullable

      protected void setParameterNullable(io.swagger.codegen.v3.CodegenParameter parameter, io.swagger.codegen.v3.CodegenProperty property)
    • setParameterJson

      protected void setParameterJson(io.swagger.codegen.v3.CodegenParameter codegenParameter, io.swagger.v3.oas.models.media.Schema parameterSchema)
    • isFileTypeSchema

      protected boolean isFileTypeSchema(io.swagger.v3.oas.models.media.Schema schema)
    • needsUnflattenedSpec

      public boolean needsUnflattenedSpec()
      Specified by:
      needsUnflattenedSpec in interface io.swagger.codegen.v3.CodegenConfig
    • setUnflattenedOpenAPI

      public void setUnflattenedOpenAPI(io.swagger.v3.oas.models.OpenAPI unflattenedOpenAPI)
      Specified by:
      setUnflattenedOpenAPI in interface io.swagger.codegen.v3.CodegenConfig
    • getIgnoreImportMapping

      public boolean getIgnoreImportMapping()
      Specified by:
      getIgnoreImportMapping in interface io.swagger.codegen.v3.CodegenConfig
    • setIgnoreImportMapping

      public void setIgnoreImportMapping(boolean ignoreImportMapping)
      Specified by:
      setIgnoreImportMapping in interface io.swagger.codegen.v3.CodegenConfig
    • defaultIgnoreImportMappingOption

      public boolean defaultIgnoreImportMappingOption()
      Specified by:
      defaultIgnoreImportMappingOption in interface io.swagger.codegen.v3.CodegenConfig
    • getSchemaHandler

      public io.swagger.codegen.v3.ISchemaHandler getSchemaHandler()
      Specified by:
      getSchemaHandler in interface io.swagger.codegen.v3.CodegenConfig
    • getOpenAPI

      public io.swagger.v3.oas.models.OpenAPI getOpenAPI()