public class ObjcClientCodegen extends DefaultCodegen implements CodegenConfig
Modifier and Type | Field and Description |
---|---|
protected Set<String> |
advancedMapingTypes |
protected String |
apiDocPath |
protected String |
apiFilesPath |
static String |
AUTHOR_EMAIL |
static String |
AUTHOR_NAME |
protected String |
authorEmail |
protected String |
authorName |
static String |
CLASS_PREFIX |
protected String |
classPrefix |
static String |
CORE_DATA |
protected String |
coreFilesPath |
static String |
DEFAULT_LICENSE |
protected Set<String> |
foundationClasses |
protected boolean |
generateCoreData |
static String |
GIT_REPO_URL |
protected String |
gitRepoURL |
protected String |
license |
static String |
LICENSE |
protected String |
modelDocPath |
protected String |
modelFilesPath |
static String |
POD_NAME |
protected String |
podName |
protected String |
podVersion |
protected String[] |
specialWords |
additionalProperties, apiDocTemplateFiles, apiPackage, apiTemplateFiles, apiTestTemplateFiles, cliOptions, commonTemplateDir, defaultIncludes, embeddedTemplateDir, ensureUniqueParams, fileSuffix, gitRepoId, gitUserId, httpUserAgent, importMapping, instantiationTypes, languageSpecificPrimitives, library, LOGGER, modelDocTemplateFiles, modelNamePrefix, modelNameSuffix, modelPackage, modelTemplateFiles, modelTestTemplateFiles, outputFolder, releaseNote, reservedWords, skipOverwrite, sortParamsByRequiredFlag, specialCharReplacements, supportedLibraries, supportingFiles, supportsInheritance, templateDir, testPackage, typeMapping, vendorExtensions
Constructor and Description |
---|
ObjcClientCodegen() |
Modifier and Type | Method and Description |
---|---|
String |
apiDocFileFolder() |
String |
apiFileFolder() |
String |
coreFileFolder() |
String |
escapeQuotationMark(String input)
Escape single and/or double quote to avoid code injection
|
String |
escapeReservedWord(String name)
Return the escaped name of the reserved word
|
String |
escapeSpecialWord(String name) |
String |
escapeUnsafeCharacters(String input)
override with any special text escaping logic to handle unsafe
characters so as to avoid code injection
|
String |
getHelp() |
String |
getName() |
String |
getSwaggerType(io.swagger.models.properties.Property p)
returns the swagger type for the property
|
CodegenType |
getTag() |
String |
getTypeDeclaration(io.swagger.models.properties.Property p)
Output the type declaration of the property
|
String |
getTypeDeclaration(String name)
Output the type declaration of a given name
|
boolean |
isDataTypeBinary(String dataType) |
String |
modelDocFileFolder() |
String |
modelFileFolder() |
void |
postProcessModelProperty(CodegenModel model,
CodegenProperty property) |
Map<String,Object> |
postProcessOperations(Map<String,Object> objs) |
void |
processOpts() |
void |
setAuthorEmail(String authorEmail) |
void |
setAuthorName(String authorName) |
void |
setClassPrefix(String classPrefix) |
void |
setGitRepoURL(String gitRepoURL) |
void |
setLicense(String license) |
protected void |
setNonArrayMapProperty(CodegenProperty property,
String type) |
void |
setParameterExampleValue(CodegenParameter p)
Return the example value of the parameter.
|
void |
setPodName(String podName) |
void |
setPodVersion(String podVersion) |
String |
toApiDocFilename(String name)
Return the file name of the Api Documentation
|
String |
toApiFilename(String name)
Return the file name of the Api Test
|
String |
toApiName(String name)
Output the API (class) name (capitalized) ending with "Api"
Return DefaultApi if name is empty
|
String |
toDefaultValue(io.swagger.models.properties.Property p)
Return the default value of the property
|
String |
toInstantiationType(io.swagger.models.properties.Property p)
Return the instantiation type of the property, especially for map and array
|
String |
toModelDocFilename(String name)
Return the capitalized file name of the model documentation
|
String |
toModelFilename(String name)
Return the capitalized file name of the model
|
String |
toModelImport(String name)
Return the fully-qualified "Model" name for import
|
String |
toModelName(String type)
Output the proper model name (capitalized)
|
String |
toModelNameWithoutReservedWordCheck(String type) |
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.
|
addAdditionPropertiesToCodeGenModel, addImport, additionalProperties, addOperationToGroup, addProperties, apiDocFilename, apiDocTemplateFiles, apiFilename, apiPackage, apiTemplateFiles, apiTestFileFolder, apiTestFilename, apiTestTemplateFiles, buildLibraryCliOption, camelize, camelize, cliOptions, dashize, defaultIncludes, embeddedTemplateDir, escapeText, fileSuffix, findCommonPrefixOfVars, findMethodResponse, fromModel, fromModel, fromOperation, fromOperation, fromParameter, fromProperty, fromResponse, fromSecurity, generateExamplePath, getCommonTemplateDir, getGitRepoId, getGitUserId, getHttpUserAgent, getLibrary, getOrGenerateOperationId, getOutputDir, getReleaseNote, getterAndSetterCapitalize, importMapping, initalizeSpecialCharacterMapping, initialCaps, instantiationTypes, isPropertyInnerMostEnum, isReservedWord, isSkipOverwrite, languageSpecificPrimitives, modelDocTemplateFiles, modelPackage, modelTemplateFiles, modelTestFileFolder, modelTestTemplateFiles, needToImport, outputFolder, postProcessAllModels, postProcessModels, postProcessModelsEnum, postProcessParameter, postProcessSupportingFileData, preprocessSwagger, processSwagger, removeNonNameElementToCamelCase, removeNonNameElementToCamelCase, reservedWords, sanitizeName, sanitizeTag, setApiPackage, setCommonTemplateDir, setEnsureUniqueParams, setGitRepoId, setGitUserId, setHttpUserAgent, setLibrary, setModelNamePrefix, setModelNameSuffix, setModelPackage, setOutputDir, setParameterBooleanFlagWithCodegenProperty, setReleaseNote, setReservedWordsLowerCase, setSkipOverwrite, setSortParamsByRequiredFlag, setTemplateDir, shouldOverwrite, snakeCase, supportedLibraries, supportingFiles, templateDir, testPackage, toApiImport, toApiTestFilename, toApiVarName, toDefaultValueWithParam, toEnumDefaultValue, toEnumName, toEnumValue, toEnumVarName, toExamples, toExampleValue, toModelTestFilename, toRegularExpression, typeMapping, underscore, updateCodegenPropertyEnum, updateDataTypeWithEnumForArray, updateDataTypeWithEnumForMap, updatePropertyForArray, updatePropertyForMap, vendorExtensions, writeOptional
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
additionalProperties, addOperationToGroup, apiDocFilename, apiDocTemplateFiles, apiFilename, apiPackage, apiTemplateFiles, apiTestFileFolder, apiTestFilename, apiTestTemplateFiles, cliOptions, defaultIncludes, embeddedTemplateDir, escapeText, fileSuffix, fromModel, fromModel, fromOperation, fromOperation, fromSecurity, generateExamplePath, getCommonTemplateDir, getGitRepoId, getGitUserId, getHttpUserAgent, getLibrary, getOutputDir, getReleaseNote, importMapping, instantiationTypes, isSkipOverwrite, languageSpecificPrimitives, modelDocTemplateFiles, modelPackage, modelTemplateFiles, modelTestFileFolder, modelTestTemplateFiles, outputFolder, postProcessAllModels, postProcessModels, postProcessParameter, postProcessSupportingFileData, preprocessSwagger, processSwagger, reservedWords, sanitizeTag, setGitRepoId, setGitUserId, setHttpUserAgent, setLibrary, setOutputDir, setReleaseNote, setSkipOverwrite, shouldOverwrite, supportedLibraries, supportingFiles, templateDir, testPackage, toApiImport, toApiTestFilename, toApiVarName, toModelTestFilename, typeMapping, vendorExtensions
public static final String CLASS_PREFIX
public static final String POD_NAME
public static final String AUTHOR_NAME
public static final String AUTHOR_EMAIL
public static final String LICENSE
public static final String GIT_REPO_URL
public static final String DEFAULT_LICENSE
public static final String CORE_DATA
protected String podName
protected String podVersion
protected String classPrefix
protected String authorName
protected String authorEmail
protected String license
protected String gitRepoURL
protected String[] specialWords
protected String apiDocPath
protected String modelDocPath
protected String modelFilesPath
protected String coreFilesPath
protected String apiFilesPath
protected boolean generateCoreData
public CodegenType getTag()
getTag
in interface CodegenConfig
public String getName()
getName
in interface CodegenConfig
public String getHelp()
getHelp
in interface CodegenConfig
public void processOpts()
processOpts
in interface CodegenConfig
processOpts
in class DefaultCodegen
public String toInstantiationType(io.swagger.models.properties.Property p)
DefaultCodegen
toInstantiationType
in class DefaultCodegen
p
- Swagger property objectpublic String getTypeDeclaration(String name)
DefaultCodegen
getTypeDeclaration
in interface CodegenConfig
getTypeDeclaration
in class DefaultCodegen
name
- namepublic String getSwaggerType(io.swagger.models.properties.Property p)
DefaultCodegen
getSwaggerType
in class DefaultCodegen
p
- Swagger property objectpublic String getTypeDeclaration(io.swagger.models.properties.Property p)
DefaultCodegen
getTypeDeclaration
in interface CodegenConfig
getTypeDeclaration
in class DefaultCodegen
p
- Swagger Property objectpublic boolean isDataTypeBinary(String dataType)
isDataTypeBinary
in class DefaultCodegen
public String toModelName(String type)
DefaultCodegen
toModelName
in interface CodegenConfig
toModelName
in class DefaultCodegen
type
- the name of the modelpublic String toModelFilename(String name)
DefaultCodegen
toModelFilename
in interface CodegenConfig
toModelFilename
in class DefaultCodegen
name
- the model nameprotected void setNonArrayMapProperty(CodegenProperty property, String type)
setNonArrayMapProperty
in class DefaultCodegen
public String toModelImport(String name)
DefaultCodegen
toModelImport
in interface CodegenConfig
toModelImport
in class DefaultCodegen
name
- the name of the "Model"public String apiDocFileFolder()
apiDocFileFolder
in interface CodegenConfig
apiDocFileFolder
in class DefaultCodegen
public String modelDocFileFolder()
modelDocFileFolder
in interface CodegenConfig
modelDocFileFolder
in class DefaultCodegen
public String toModelDocFilename(String name)
DefaultCodegen
toModelDocFilename
in interface CodegenConfig
toModelDocFilename
in class DefaultCodegen
name
- the model namepublic String toApiDocFilename(String name)
DefaultCodegen
toApiDocFilename
in interface CodegenConfig
toApiDocFilename
in class DefaultCodegen
name
- the file name of the Apipublic String apiFileFolder()
apiFileFolder
in interface CodegenConfig
apiFileFolder
in class DefaultCodegen
public String modelFileFolder()
modelFileFolder
in interface CodegenConfig
modelFileFolder
in class DefaultCodegen
public String coreFileFolder()
public String toApiName(String name)
DefaultCodegen
toApiName
in interface CodegenConfig
toApiName
in class DefaultCodegen
name
- the name of the Apipublic String toApiFilename(String name)
DefaultCodegen
toApiFilename
in interface CodegenConfig
toApiFilename
in class DefaultCodegen
name
- the file name of the Apipublic String toVarName(String name)
DefaultCodegen
toVarName
in class DefaultCodegen
name
- the variable namepublic String toParamName(String name)
DefaultCodegen
toParamName
in interface CodegenConfig
toParamName
in class DefaultCodegen
name
- Codegen property objectpublic String escapeReservedWord(String name)
DefaultCodegen
escapeReservedWord
in interface CodegenConfig
escapeReservedWord
in class DefaultCodegen
name
- the name to be escapedpublic String toOperationId(String operationId)
DefaultCodegen
toOperationId
in class DefaultCodegen
operationId
- operation IDpublic void setClassPrefix(String classPrefix)
public void setPodName(String podName)
public void setPodVersion(String podVersion)
public void setAuthorEmail(String authorEmail)
public void setAuthorName(String authorName)
public void setGitRepoURL(String gitRepoURL)
public void setLicense(String license)
public Map<String,Object> postProcessOperations(Map<String,Object> objs)
postProcessOperations
in interface CodegenConfig
postProcessOperations
in class DefaultCodegen
public void postProcessModelProperty(CodegenModel model, CodegenProperty property)
postProcessModelProperty
in interface CodegenConfig
postProcessModelProperty
in class DefaultCodegen
public String toDefaultValue(io.swagger.models.properties.Property p)
toDefaultValue
in class DefaultCodegen
p
- Swagger property objectpublic void setParameterExampleValue(CodegenParameter p)
DefaultCodegen
setParameterExampleValue
in class DefaultCodegen
p
- Swagger property objectpublic String escapeQuotationMark(String input)
DefaultCodegen
escapeQuotationMark
in interface CodegenConfig
escapeQuotationMark
in class DefaultCodegen
input
- String to be cleaned uppublic String escapeUnsafeCharacters(String input)
DefaultCodegen
escapeUnsafeCharacters
in interface CodegenConfig
escapeUnsafeCharacters
in class DefaultCodegen
input
- String to be cleaned upCopyright © 2016. All rights reserved.