Class SwiftCombineClientCodegen
- java.lang.Object
-
- org.openapitools.codegen.DefaultCodegen
-
- org.openapitools.codegen.languages.SwiftCombineClientCodegen
-
- All Implemented Interfaces:
CodegenConfig
public class SwiftCombineClientCodegen extends DefaultCodegen implements CodegenConfig
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
anyDecoderWasAdded
static String
MAP_FILE_BINARY_TO_DATA
protected boolean
mapFileBinaryToData
protected List<String>
notCodableTypes
protected String
privateFolder
static String
PROJECT_NAME
protected String
projectName
protected String
sourceFolder
protected String
transportFolder
-
Fields inherited from class org.openapitools.codegen.DefaultCodegen
additionalProperties, addOneOfInterfaceImports, addOneOfInterfaces, addSuffixToDuplicateOperationNicknames, allowUnicodeIdentifiers, apiDocTemplateFiles, apiNamePrefix, apiNameSuffix, apiPackage, apiTemplateFiles, apiTestTemplateFiles, autosetConstants, cliOptions, DefaultFeatureSet, defaultIncludes, disallowAdditionalPropertiesIfNotPresent, docExtension, embeddedTemplateDir, enableMinimalUpdate, enablePostProcessFile, ensureUniqueParams, enumNameMapping, enumUnknownDefaultCase, enumUnknownDefaultCaseName, falseSchema, filesMetadataFilename, fileSuffix, generatorMetadata, gitHost, gitRepoId, gitUserId, hideGenerationTimestamp, httpUserAgent, ignoreFilePathOverride, importBaseType, importContainerType, importMapping, inlineSchemaNameMapping, inlineSchemaOption, inputSpec, instantiationTypes, JSON_MIME_PATTERN, JSON_VENDOR_MIME_PATTERN, languageSpecificPrimitives, legacyDiscriminatorBehavior, library, loadDeepObjectIntoItems, modelDocTemplateFiles, modelNameMapping, modelNamePrefix, modelNameSuffix, modelPackage, modelTemplateFiles, modelTestTemplateFiles, nameMapping, openAPI, openapiGeneratorIgnoreList, openapiNormalizer, operationIdNameMapping, outputFolder, parameterNameMapping, prependFormOrBodyParameters, releaseNote, removeEnumValuePrefix, removeOperationIdPrefix, removeOperationIdPrefixCount, removeOperationIdPrefixDelimiter, reservedWords, reservedWordsMappings, schemaMapping, serverVariables, skipOperationExample, skipOverwrite, skipSortingOperations, sortModelPropertiesByRequiredFlag, sortParamsByRequiredFlag, specialCharReplacements, strictSpecBehavior, supportedLibraries, supportingFiles, supportsAdditionalPropertiesWithComposedSchema, supportsInheritance, supportsMixins, supportsMultipleInheritance, templateDir, templateOutputDirs, testPackage, trueSchema, typeAliases, typeMapping, useOneOfInterfaces, vendorExtensions, versionMetadataFilename, XML_MIME_PATTERN
-
-
Constructor Summary
Constructors Constructor Description SwiftCombineClientCodegen()
Constructor for the swift language codegen module.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addAnyDecoderIfNeeded()
protected void
addFormVendorExtensions(CodegenParameter cp, CodegenOperation operation, HashMap<String,CodegenModel> modelMaps)
protected void
addVendorExtensions(CodegenParameter cp, CodegenOperation operation, HashMap<String,CodegenModel> modelMaps)
String
apiFileFolder()
String
escapeQuotationMark(String input)
Escape single and/or double quote to avoid code injectionString
escapeReservedWord(String name)
Return the escaped name of the reserved wordString
escapeUnsafeCharacters(String input)
override with any special text escaping logic to handle unsafe characters so as to avoid code injectionCodegenModel
fromModel(String name, io.swagger.v3.oas.models.media.Schema schema)
Convert OAS Model object to Codegen Model object.GeneratorLanguage
generatorLanguage()
String
getHelp()
String
getName()
String
getSchemaType(io.swagger.v3.oas.models.media.Schema p)
returns the OpenAPI type for the property.CodegenType
getTag()
String
getTypeDeclaration(io.swagger.v3.oas.models.media.Schema p)
Output the language-specific type declaration of the property.boolean
isDataTypeBinary(String dataType)
boolean
isDataTypeFile(String dataType)
protected boolean
isReservedWord(String word)
String
modelFileFolder()
void
postProcess()
void
postProcessFile(File file, String fileType)
Post-process the auto-generated file, e.g. using go-fmt to format the Go code.ModelsMap
postProcessModels(ModelsMap objs)
OperationsMap
postProcessOperationsWithModels(OperationsMap objs, List<ModelMap> allModels)
void
processOpts()
String
toApiDocFilename(String name)
Return the file name of the Api DocumentationString
toApiName(String name)
Output the API (class) name (capitalized) ending with the specified or default suffix Return DefaultApi if name is emptyString
toDefaultValue(io.swagger.v3.oas.models.media.Schema p)
Return the default value of the propertyString
toEnumDefaultValue(String value, String datatype)
Return the enum default value in the language specified formatString
toEnumName(CodegenProperty property)
Return the Enum name (e.g.String
toEnumValue(String value, String datatype)
Return the enum value in the language specified format e.g. status becomes "status"String
toEnumVarName(String name, String datatype)
Return the sanitized variable name for enumString
toInstantiationType(io.swagger.v3.oas.models.media.Schema p)
Return the instantiation type of the property, especially for map and arrayString
toModelDocFilename(String name)
Return the capitalized file name of the model documentationString
toModelFilename(String name)
Return the capitalized file name of the model.String
toModelName(String name)
Output the proper model name (capitalized).String
toOperationId(String operationId)
Return the operation ID (method name)String
toParamName(String name)
Return the parameter name by removing invalid characters and proper escaping if it's a reserved word.String
toVarName(String name)
Return the variable name by removing invalid characters and proper escaping if it's a reserved word.-
Methods inherited from class org.openapitools.codegen.DefaultCodegen
addAdditionPropertiesToCodeGenModel, addBodyModelSchema, addHeaders, addImport, addImport, addImport, addImports, addImports, addImports, addImportsForPropertyType, addImportsToOneOfInterface, additionalProperties, addMustacheLambdas, addOneOfInterfaceModel, addOneOfNameExtension, addOperationToGroup, addOption, addOption, addParentContainer, addParentFromContainer, addProperties, addRegularExpressionDelimiter, addRequiredVarsMap, addSwitch, addVars, addVars, addVarsRequiredVarsAdditionalProps, apiDocFileFolder, apiDocFilename, apiDocTemplateFiles, apiFilename, apiFilename, apiPackage, apiTemplateFiles, apiTestFileFolder, apiTestFilename, apiTestTemplateFiles, buildEnumVars, buildLibraryCliOption, cliOptions, convertPropertyToBoolean, convertPropertyToBooleanAndWriteBack, convertPropertyToBooleanAndWriteBack, convertPropertyToStringAndWriteBack, convertPropertyToTypeAndWriteBack, createDiscriminator, defaultIncludes, defaultTemplatingEngine, embeddedTemplateDir, encodePath, enumNameMapping, escapeText, escapeTextInSingleQuotes, escapeTextWhileAllowingNewLines, executePostProcessor, fileSuffix, findCommonPrefixOfVars, findMethodResponse, fromCallback, fromFormProperty, fromOperation, fromParameter, fromProperty, fromProperty, fromProperty, fromRequestBody, fromRequestBodyToFormParameters, fromResponse, fromSecurity, fromServers, fromServerVariables, generateExamplePath, generateJSONSpecFile, generateYAMLSpecFile, generatorLanguageVersion, getAdditionalPropertiesName, getAddSuffixToDuplicateOperationNicknames, getAlias, getAllModels, getAllOfDescendants, getCollectionFormat, getCollectionFormat, getConsumesInfo, getContent, getContentType, getDisallowAdditionalPropertiesIfNotPresent, getDocExtension, getEnumDefaultValue, getEnumUnknownDefaultCase, getEnumValueForProperty, getFeatureSet, getFilesMetadataFilename, getGeneratorMetadata, getGitHost, getGitRepoId, getGitUserId, getHttpUserAgent, getIgnoreFilePathOverride, getInnerEnumAllowableValues, getInputSpec, getItemsName, getLegacyDiscriminatorBehavior, getLibrary, getModelNameToSchemaCache, getMostInnerItems, getOneOfAnyOfDescendants, getOpenapiGeneratorIgnoreList, getOrGenerateOperationId, getOutputDir, getParameterDataType, getProducesInfo, getReleaseNote, getSchemaAdditionalProperties, getSchemaFromBooleanOrSchema, getSingleSchemaType, getSupportedVendorExtensions, getSymbolName, getTemplatingEngine, getterAndSetterCapitalize, getTypeDeclaration, getUseInlineModelResolver, getUseOneOfInterfaces, getUseOpenapiNormalizer, getVersionMetadataFilename, handleConstantParams, handleMethodResponse, handleMethodResponse, handleSpecialCharacters, hasBodyParameter, hasFormParameter, importMapping, initializeSpecialCharacterMapping, inlineSchemaNameMapping, inlineSchemaOption, instantiationTypes, isDataTypeString, isEnableMinimalUpdate, isEnablePostProcessFile, isHideGenerationTimestamp, isJsonMimeType, isJsonVendorMimeType, isLibrary, isParameterNameUnique, isPropertyInnerMostEnum, isRemoveEnumValuePrefix, isRemoveOperationIdPrefix, isSkipOperationExample, isSkipOverwrite, isSkipSortingOperations, isStrictSpecBehavior, isTypeErasedGenerics, isXmlMimeType, languageSpecificPrimitives, lowerCamelCase, modelDocFileFolder, modelDocTemplateFiles, modelFilename, modelFilename, modelNameMapping, modelPackage, modelTemplateFiles, modelTestFileFolder, modelTestTemplateFiles, modifyFeatureSet, nameMapping, needToImport, openapiGeneratorIgnoreList, openapiNormalizer, operationIdNameMapping, outputFolder, parameterNameMapping, postProcessAllModels, postProcessEnumVars, postProcessModelProperty, postProcessModelsEnum, postProcessParameter, postProcessResponseWithProperty, postProcessSupportingFileData, postProcessWebhooksWithModels, preprocessOpenAPI, processCompiler, processOpenAPI, processTemplatingEngine, processTestExampleData, removeImport, removeNonNameElementToCamelCase, removeNonNameElementToCamelCase, removeOption, removeSelfReferenceImports, reservedWords, reservedWordsMappings, sanitizeName, sanitizeName, sanitizeName, sanitizeTag, schemaMapping, serverVariableOverrides, setAddProps, setCircularReferences, setDocExtension, setEnableMinimalUpdate, setEnablePostProcessFile, setEnumDiscriminatorDefaultValue, setGitHost, setGitRepoId, setGitUserId, setHideGenerationTimestamp, setHttpUserAgent, setIgnoreFilePathOverride, setInputSpec, setLibrary, setNonArrayMapProperty, setOpenAPI, setOutputDir, setParameterBooleanFlagWithCodegenProperty, setParameterEncodingValues, setParameterExamples, setParameterExampleValue, setParameterExampleValue, setParameterExampleValue, setParameterNullable, setReleaseNote, setRemoveEnumValuePrefix, setRemoveOperationIdPrefix, setReservedWordsLowerCase, setSkipOperationExample, setSkipOverwrite, setSkipSortingOperations, setStrictSpecBehavior, setTemplatingEngine, setUseOneOfInterfaces, shouldAddImport, shouldOverwrite, SortModelPropertiesByRequiredFlag, SortParametersByRequiredFlag, specVersionGreaterThanOrEqualTo310, supportedLibraries, supportingFiles, templateDir, templateOutputDirs, testPackage, toAllOfName, toAnyOfName, toApiFilename, toApiImport, toApiTestFilename, toApiVarName, toArrayModelParamName, toBooleanGetter, toDefaultParameterValue, toDefaultParameterValue, toDefaultValue, toDefaultValueWithParam, toEnumDefaultValue, toExamples, toExampleValue, toGetter, toMediaTypeSchemaName, toModelImport, toModelImportMap, toModelTestFilename, toOneOfName, toRegularExpression, toSetter, toTestCaseName, typeMapping, unaliasPropertySchema, unaliasSchema, updateAllModels, updateCodegenPropertyEnum, updateDataTypeWithEnumForArray, updateDataTypeWithEnumForMap, updateEnumVarsWithExtensions, updateModelForAnyType, updateModelForComposedSchema, updateModelForInteger, updateModelForNumber, updateModelForObject, updateModelForString, updateOption, updateParameterForString, updatePropertyForAnyType, updatePropertyForArray, updatePropertyForInteger, updatePropertyForMap, updatePropertyForMap, updatePropertyForNumber, updatePropertyForObject, updatePropertyForString, updateRequestBodyForArray, updateRequestBodyForMap, updateRequestBodyForObject, updateRequestBodyForPrimitiveType, updateRequestBodyForString, useCodegenAsMustacheParentContext, vendorExtensions, writePropertyBack
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.openapitools.codegen.CodegenConfig
additionalProperties, addOperationToGroup, apiDocFileFolder, apiDocFilename, apiDocTemplateFiles, apiFilename, apiFilename, apiPackage, apiTemplateFiles, apiTestFileFolder, apiTestFilename, apiTestTemplateFiles, cliOptions, defaultIncludes, defaultTemplatingEngine, embeddedTemplateDir, encodePath, enumNameMapping, escapeText, escapeTextWhileAllowingNewLines, fileSuffix, fromOperation, fromSecurity, fromServers, fromServerVariables, generateExamplePath, generatorLanguageVersion, getAddSuffixToDuplicateOperationNicknames, getDocExtension, getFeatureSet, getFilesMetadataFilename, getGeneratorMetadata, getGitHost, getGitRepoId, getGitUserId, getHttpUserAgent, getIgnoreFilePathOverride, getInputSpec, getLibrary, getOpenapiGeneratorIgnoreList, getOutputDir, getReleaseNote, getSupportedVendorExtensions, getTemplatingEngine, getTypeDeclaration, getUseInlineModelResolver, getUseOpenapiNormalizer, getVersionMetadataFilename, importMapping, inlineSchemaNameMapping, inlineSchemaOption, instantiationTypes, isEnableMinimalUpdate, isEnablePostProcessFile, isHideGenerationTimestamp, isRemoveEnumValuePrefix, isRemoveOperationIdPrefix, isSkipOperationExample, isSkipOverwrite, isSkipSortingOperations, isStrictSpecBehavior, isTypeErasedGenerics, languageSpecificPrimitives, modelDocFileFolder, modelDocTemplateFiles, modelFilename, modelFilename, modelNameMapping, modelPackage, modelTemplateFiles, modelTestFileFolder, modelTestTemplateFiles, nameMapping, openapiGeneratorIgnoreList, openapiNormalizer, operationIdNameMapping, outputFolder, parameterNameMapping, postProcessAllModels, postProcessModelProperty, postProcessParameter, postProcessResponseWithProperty, postProcessSupportingFileData, postProcessWebhooksWithModels, preprocessOpenAPI, processCompiler, processOpenAPI, processTemplatingEngine, reservedWords, reservedWordsMappings, sanitizeName, sanitizeTag, schemaMapping, serverVariableOverrides, setDocExtension, setEnableMinimalUpdate, setEnablePostProcessFile, setGitHost, setGitRepoId, setGitUserId, setHideGenerationTimestamp, setHttpUserAgent, setIgnoreFilePathOverride, setInputSpec, setLibrary, setOpenAPI, setOutputDir, setReleaseNote, setRemoveEnumValuePrefix, setRemoveOperationIdPrefix, setSkipOperationExample, setSkipOverwrite, setSkipSortingOperations, setStrictSpecBehavior, setTemplatingEngine, shouldOverwrite, supportedLibraries, supportingFiles, templateDir, templateOutputDirs, testPackage, toApiFilename, toApiImport, toApiTestFilename, toApiVarName, toBooleanGetter, toGetter, toModelImport, toModelImportMap, toModelTestFilename, toSetter, typeMapping, unaliasSchema, updateAllModels, vendorExtensions
-
-
-
-
Field Detail
-
PROJECT_NAME
public static final String PROJECT_NAME
- See Also:
- Constant Field Values
-
MAP_FILE_BINARY_TO_DATA
public static final String MAP_FILE_BINARY_TO_DATA
- See Also:
- Constant Field Values
-
projectName
protected String projectName
-
privateFolder
protected String privateFolder
-
sourceFolder
protected String sourceFolder
-
transportFolder
protected String transportFolder
-
mapFileBinaryToData
protected boolean mapFileBinaryToData
-
anyDecoderWasAdded
protected boolean anyDecoderWasAdded
-
-
Method Detail
-
getTag
public CodegenType getTag()
- Specified by:
getTag
in interfaceCodegenConfig
- Overrides:
getTag
in classDefaultCodegen
-
getName
public String getName()
- Specified by:
getName
in interfaceCodegenConfig
- Overrides:
getName
in classDefaultCodegen
-
getHelp
public String getHelp()
- Specified by:
getHelp
in interfaceCodegenConfig
- Overrides:
getHelp
in classDefaultCodegen
-
processOpts
public void processOpts()
- Specified by:
processOpts
in interfaceCodegenConfig
- Overrides:
processOpts
in classDefaultCodegen
-
isReservedWord
protected boolean isReservedWord(String word)
- Overrides:
isReservedWord
in classDefaultCodegen
-
escapeReservedWord
public String escapeReservedWord(String name)
Description copied from class:DefaultCodegen
Return the escaped name of the reserved word- Specified by:
escapeReservedWord
in interfaceCodegenConfig
- Overrides:
escapeReservedWord
in classDefaultCodegen
- Parameters:
name
- the name to be escaped- Returns:
- the escaped reserved word
throws Runtime exception as reserved word is not allowed (default behavior)
-
modelFileFolder
public String modelFileFolder()
- Specified by:
modelFileFolder
in interfaceCodegenConfig
- Overrides:
modelFileFolder
in classDefaultCodegen
-
apiFileFolder
public String apiFileFolder()
- Specified by:
apiFileFolder
in interfaceCodegenConfig
- Overrides:
apiFileFolder
in classDefaultCodegen
-
getTypeDeclaration
public String getTypeDeclaration(io.swagger.v3.oas.models.media.Schema p)
Description copied from class:DefaultCodegen
Output the language-specific type declaration of the property.- Specified by:
getTypeDeclaration
in interfaceCodegenConfig
- Overrides:
getTypeDeclaration
in classDefaultCodegen
- Parameters:
p
- property schema- Returns:
- a string presentation of the property type
-
getSchemaType
public String getSchemaType(io.swagger.v3.oas.models.media.Schema p)
Description copied from class:DefaultCodegen
returns the OpenAPI type for the property. Use getAlias to handle $ref of primitive type- Overrides:
getSchemaType
in classDefaultCodegen
- Parameters:
p
- property schema- Returns:
- string presentation of the type
-
isDataTypeFile
public boolean isDataTypeFile(String dataType)
- Overrides:
isDataTypeFile
in classDefaultCodegen
-
isDataTypeBinary
public boolean isDataTypeBinary(String dataType)
- Overrides:
isDataTypeBinary
in classDefaultCodegen
-
toModelName
public String toModelName(String name)
Output the proper model name (capitalized).- Specified by:
toModelName
in interfaceCodegenConfig
- Overrides:
toModelName
in classDefaultCodegen
- Parameters:
name
- the name of the model- Returns:
- capitalized model name
-
toModelFilename
public String toModelFilename(String name)
Return the capitalized file name of the model.- Specified by:
toModelFilename
in interfaceCodegenConfig
- Overrides:
toModelFilename
in classDefaultCodegen
- Parameters:
name
- the model name- Returns:
- the file name of the model
-
toDefaultValue
public String toDefaultValue(io.swagger.v3.oas.models.media.Schema p)
Description copied from class:DefaultCodegen
Return the default value of the propertyThis method should be overridden in the generator to meet its requirement. Return null if you do NOT want a default value. Any non-null value will cause {{#defaultValue} check to pass.
- Overrides:
toDefaultValue
in classDefaultCodegen
- Parameters:
p
- Property schema- Returns:
- string presentation of the default value of the property
-
toInstantiationType
public String toInstantiationType(io.swagger.v3.oas.models.media.Schema p)
Description copied from class:DefaultCodegen
Return the instantiation type of the property, especially for map and array- Overrides:
toInstantiationType
in classDefaultCodegen
- Parameters:
p
- property schema- Returns:
- string presentation of the instantiation type of the property
-
toApiName
public String toApiName(String name)
Description copied from class:DefaultCodegen
Output the API (class) name (capitalized) ending with the specified or default suffix Return DefaultApi if name is empty- Specified by:
toApiName
in interfaceCodegenConfig
- Overrides:
toApiName
in classDefaultCodegen
- Parameters:
name
- the name of the Api- Returns:
- capitalized Api name
-
toModelDocFilename
public String toModelDocFilename(String name)
Description copied from class:DefaultCodegen
Return the capitalized file name of the model documentation- Specified by:
toModelDocFilename
in interfaceCodegenConfig
- Overrides:
toModelDocFilename
in classDefaultCodegen
- Parameters:
name
- the model name- Returns:
- the file name of the model
-
toApiDocFilename
public String toApiDocFilename(String name)
Description copied from class:DefaultCodegen
Return the file name of the Api Documentation- Specified by:
toApiDocFilename
in interfaceCodegenConfig
- Overrides:
toApiDocFilename
in classDefaultCodegen
- Parameters:
name
- the file name of the Api- Returns:
- the file name of the Api
-
toOperationId
public String toOperationId(String operationId)
Description copied from class:DefaultCodegen
Return the operation ID (method name)- Overrides:
toOperationId
in classDefaultCodegen
- Parameters:
operationId
- operation ID- Returns:
- the sanitized method name
-
toVarName
public String toVarName(String name)
Description copied from class:DefaultCodegen
Return the variable name by removing invalid characters and proper escaping if it's a reserved word.- Overrides:
toVarName
in classDefaultCodegen
- Parameters:
name
- the variable name- Returns:
- the sanitized variable name
-
toParamName
public String toParamName(String name)
Description copied from class:DefaultCodegen
Return the parameter name by removing invalid characters and proper escaping if it's a reserved word.- Specified by:
toParamName
in interfaceCodegenConfig
- Overrides:
toParamName
in classDefaultCodegen
- Parameters:
name
- Codegen property object- Returns:
- the sanitized parameter name
-
fromModel
public CodegenModel fromModel(String name, io.swagger.v3.oas.models.media.Schema schema)
Description copied from class:DefaultCodegen
Convert OAS Model object to Codegen Model object.- Specified by:
fromModel
in interfaceCodegenConfig
- Overrides:
fromModel
in classDefaultCodegen
- Parameters:
name
- the name of the modelschema
- OAS Model object- Returns:
- Codegen Model object
-
toEnumValue
public String toEnumValue(String value, String datatype)
Description copied from class:DefaultCodegen
Return the enum value in the language specified format e.g. status becomes "status"- Overrides:
toEnumValue
in classDefaultCodegen
- Parameters:
value
- enum variable namedatatype
- data type- Returns:
- the sanitized value for enum
-
toEnumDefaultValue
public String toEnumDefaultValue(String value, String datatype)
Description copied from class:DefaultCodegen
Return the enum default value in the language specified format- Overrides:
toEnumDefaultValue
in classDefaultCodegen
- Parameters:
value
- enum variable namedatatype
- data type- Returns:
- the default value for the enum
-
toEnumVarName
public String toEnumVarName(String name, String datatype)
Description copied from class:DefaultCodegen
Return the sanitized variable name for enum- Overrides:
toEnumVarName
in classDefaultCodegen
- Parameters:
name
- enum variable namedatatype
- data type- Returns:
- the sanitized variable name for enum
-
toEnumName
public String toEnumName(CodegenProperty property)
Description copied from class:DefaultCodegen
Return the Enum name (e.g. StatusEnum given 'status')- Overrides:
toEnumName
in classDefaultCodegen
- Parameters:
property
- Codegen property- Returns:
- the Enum name
-
postProcessModels
public ModelsMap postProcessModels(ModelsMap objs)
- Specified by:
postProcessModels
in interfaceCodegenConfig
- Overrides:
postProcessModels
in classDefaultCodegen
-
escapeQuotationMark
public String escapeQuotationMark(String input)
Description copied from class:DefaultCodegen
Escape single and/or double quote to avoid code injection- Specified by:
escapeQuotationMark
in interfaceCodegenConfig
- Overrides:
escapeQuotationMark
in classDefaultCodegen
- Parameters:
input
- String to be cleaned up- Returns:
- string with quotation mark removed or escaped
-
escapeUnsafeCharacters
public String escapeUnsafeCharacters(String input)
Description copied from class:DefaultCodegen
override with any special text escaping logic to handle unsafe characters so as to avoid code injection- Specified by:
escapeUnsafeCharacters
in interfaceCodegenConfig
- Overrides:
escapeUnsafeCharacters
in classDefaultCodegen
- Parameters:
input
- String to be cleaned up- Returns:
- string with unsafe characters removed or escaped
-
postProcessFile
public void postProcessFile(File file, String fileType)
Description copied from class:DefaultCodegen
Post-process the auto-generated file, e.g. using go-fmt to format the Go code. The file type can be "model-test", "model-doc", "model", "api", "api-test", "api-doc", "supporting-file", "openapi-generator-ignore", "openapi-generator-version"TODO: store these values in enum instead
- Specified by:
postProcessFile
in interfaceCodegenConfig
- Overrides:
postProcessFile
in classDefaultCodegen
- Parameters:
file
- file to be processedfileType
- file type
-
postProcessOperationsWithModels
public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List<ModelMap> allModels)
- Specified by:
postProcessOperationsWithModels
in interfaceCodegenConfig
- Overrides:
postProcessOperationsWithModels
in classDefaultCodegen
-
addVendorExtensions
protected void addVendorExtensions(CodegenParameter cp, CodegenOperation operation, HashMap<String,CodegenModel> modelMaps)
-
addFormVendorExtensions
protected void addFormVendorExtensions(CodegenParameter cp, CodegenOperation operation, HashMap<String,CodegenModel> modelMaps)
-
postProcess
public void postProcess()
- Specified by:
postProcess
in interfaceCodegenConfig
- Overrides:
postProcess
in classDefaultCodegen
-
generatorLanguage
public GeneratorLanguage generatorLanguage()
- Specified by:
generatorLanguage
in interfaceCodegenConfig
- Overrides:
generatorLanguage
in classDefaultCodegen
-
addAnyDecoderIfNeeded
protected void addAnyDecoderIfNeeded()
-
-