Class BashClientCodegen
- java.lang.Object
-
- org.openapitools.codegen.DefaultCodegen
-
- org.openapitools.codegen.languages.BashClientCodegen
-
- All Implemented Interfaces:
CodegenConfig
public class BashClientCodegen extends DefaultCodegen implements CodegenConfig
-
-
Field Summary
Fields Modifier and Type Field Description protected String
apiDocPath
static String
APIKEY_AUTH_ENVIRONMENT_VARIABLE_NAME
protected String
apiKeyAuthEnvironmentVariable
protected String
apiVersion
static String
BASIC_AUTH_ENVIRONMENT_VARIABLE_NAME
protected String
basicAuthEnvironmentVariable
static String
CURL_OPTIONS
protected String
curlOptions
protected static int
emptyMethodNameCounter
static String
GENERATE_BASH_COMPLETION
static String
GENERATE_ZSH_COMPLETION
protected boolean
generateBashCompletion
protected boolean
generateZshCompletion
static String
HOST_ENVIRONMENT_VARIABLE_NAME
protected String
hostEnvironmentVariable
protected String
modelDocPath
static String
PROCESS_MARKDOWN
protected boolean
processMarkdown
static String
SCRIPT_NAME
protected String
scriptName
-
Fields inherited from class org.openapitools.codegen.DefaultCodegen
additionalProperties, addOneOfInterfaceImports, addOneOfInterfaces, addSuffixToDuplicateOperationNicknames, allowUnicodeIdentifiers, apiDocTemplateFiles, apiNamePrefix, apiNameSuffix, apiPackage, apiTemplateFiles, apiTestTemplateFiles, cliOptions, DefaultFeatureSet, defaultIncludes, disallowAdditionalPropertiesIfNotPresent, docExtension, embeddedTemplateDir, enableMinimalUpdate, enablePostProcessFile, ensureUniqueParams, 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, openapiNormalizer, outputFolder, parameterNameMapping, prependFormOrBodyParameters, releaseNote, removeEnumValuePrefix, removeOperationIdPrefix, removeOperationIdPrefixCount, removeOperationIdPrefixDelimiter, reservedWords, reservedWordsMappings, schemaMapping, serverVariables, skipOperationExample, skipOverwrite, sortModelPropertiesByRequiredFlag, sortParamsByRequiredFlag, specialCharReplacements, strictSpecBehavior, supportedLibraries, supportingFiles, supportsAdditionalPropertiesWithComposedSchema, supportsInheritance, supportsMixins, supportsMultipleInheritance, templateDir, testPackage, trueSchema, typeAliases, typeMapping, useOneOfInterfaces, vendorExtensions, versionMetadataFilename, XML_MIME_PATTERN
-
-
Constructor Summary
Constructors Constructor Description BashClientCodegen()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
apiDocFileFolder()
String
apiFileFolder()
Location to write api files.String
escapeQuotationMark(String input)
Escape single and/or double quote to avoid code injectionString
escapeReservedWord(String name)
Escapes a reserved word as defined in the `reservedWords` array.String
escapeText(String input)
Override with any special text escaping logicString
escapeUnsafeCharacters(String input)
Override with any special text escaping logic to handle unsafe characters so as to avoid code injection.CodegenOperation
fromOperation(String path, String httpMethod, io.swagger.v3.oas.models.Operation operation, List<io.swagger.v3.oas.models.servers.Server> servers)
Convert OAS Operation object to Codegen Operation objectCodegenParameter
fromParameter(io.swagger.v3.oas.models.parameters.Parameter param, Set<String> imports)
Convert OpenAPI Parameter object to Codegen Parameter objectGeneratorLanguage
generatorLanguage()
String
getHelp()
Returns human-friendly help for the generator.String
getName()
Configures a friendly name for the generator.String
getSchemaType(io.swagger.v3.oas.models.media.Schema p)
Optional - schema type conversion.CodegenType
getTag()
Configures the type of generator.String
getTypeDeclaration(io.swagger.v3.oas.models.media.Schema p)
Optional - type declaration.String
modelDocFileFolder()
String
modelFileFolder()
Location to write model files.void
preprocessOpenAPI(io.swagger.v3.oas.models.OpenAPI openAPI)
Preprocess original properties from the OpenAPI definition where necessary.void
processOpts()
void
setApiKeyAuthEnvironmentVariable(String apiKeyAuthEnvironmentVariable)
void
setBasicAuthEnvironmentVariable(String basicAuthEnvironmentVariable)
void
setCurlOptions(String curlOptions)
void
setGenerateBashCompletion(boolean generateBashCompletion)
void
setGenerateZshCompletion(boolean generateZshCompletion)
void
setHostEnvironmentVariable(String hostEnvironmentVariable)
void
setParameterExampleValue(CodegenParameter p)
Return the example value of the parameter.void
setProcessMarkdown(boolean processMarkdown)
void
setScriptName(String scriptName)
String
toApiDocFilename(String name)
Return the file name of the Api DocumentationString
toModelDocFilename(String name)
Return the capitalized file name of the model documentationString
toModelFilename(String name)
Return the capitalized file name of the modelString
toOperationId(String operationId)
Return the operation ID (method name)-
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, addProperties, addRegularExpressionDelimiter, addRequiredVarsMap, addSwitch, addVars, addVars, addVarsRequiredVarsAdditionalProps, apiDocFilename, apiDocTemplateFiles, apiFilename, apiPackage, apiTemplateFiles, apiTestFileFolder, apiTestFilename, apiTestTemplateFiles, buildEnumVars, buildLibraryCliOption, cliOptions, convertPropertyToBoolean, convertPropertyToBooleanAndWriteBack, createDiscriminator, defaultIncludes, defaultTemplatingEngine, embeddedTemplateDir, encodePath, escapeTextWhileAllowingNewLines, fileSuffix, findCommonPrefixOfVars, findMethodResponse, fromCallback, fromFormProperty, fromModel, fromProperty, fromProperty, fromProperty, fromRequestBody, fromRequestBodyToFormParameters, fromResponse, fromSecurity, fromServers, fromServerVariables, generateExamplePath, generateJSONSpecFile, generateYAMLSpecFile, generatorLanguageVersion, getAdditionalPropertiesName, getAddSuffixToDuplicateOperationNicknames, getAlias, getAllModels, getAllOfDescendants, getAllowUnicodeIdentifiers, getApiNamePrefix, getApiNameSuffix, getCollectionFormat, getCollectionFormat, getConsumesInfo, getContent, getContentType, getDisallowAdditionalPropertiesIfNotPresent, getDocExtension, getEnsureUniqueParams, getEnumDefaultValue, getEnumUnknownDefaultCase, getFeatureSet, getFilesMetadataFilename, getGeneratorMetadata, getGitHost, getGitRepoId, getGitUserId, getHttpUserAgent, getIgnoreFilePathOverride, getInnerEnumAllowableValues, getInputSpec, getItemsName, getLegacyDiscriminatorBehavior, getLibrary, getModelNamePrefix, getModelNameSuffix, getModelNameToSchemaCache, getMostInnerItems, getOneOfAnyOfDescendants, getOrGenerateOperationId, getOutputDir, getParameterDataType, getPrependFormOrBodyParameters, getProducesInfo, getReleaseNote, getRemoveOperationIdPrefixCount, getRemoveOperationIdPrefixDelimiter, getSchemaAdditionalProperties, getSchemaFromBooleanOrSchema, getSchemaItems, getSingleSchemaType, getSortModelPropertiesByRequiredFlag, getSortParamsByRequiredFlag, getSupportedVendorExtensions, getSymbolName, getTemplatingEngine, getterAndSetterCapitalize, getTypeDeclaration, getUseInlineModelResolver, getUseOneOfInterfaces, getUseOpenAPINormalizer, getVersionMetadataFilename, handleMethodResponse, handleMethodResponse, handleSpecialCharacters, hasBodyParameter, hasFormParameter, importMapping, initializeSpecialCharacterMapping, inlineSchemaNameMapping, inlineSchemaOption, instantiationTypes, isAnyTypeSchema, isDataTypeBinary, isDataTypeFile, isDataTypeString, isEnableMinimalUpdate, isEnablePostProcessFile, isHideGenerationTimestamp, isJsonMimeType, isJsonVendorMimeType, isLibrary, isParameterNameUnique, isPropertyInnerMostEnum, isRemoveEnumValuePrefix, isRemoveOperationIdPrefix, isReservedWord, isSkipOperationExample, isSkipOverwrite, isStrictSpecBehavior, isXmlMimeType, languageSpecificPrimitives, lowerCamelCase, modelDocTemplateFiles, modelFilename, modelNameMapping, modelPackage, modelTemplateFiles, modelTestFileFolder, modelTestTemplateFiles, modifyFeatureSet, nameMapping, needToImport, openapiNormalizer, outputFolder, parameterNameMapping, postProcess, postProcessAllModels, postProcessFile, postProcessModelProperty, postProcessModels, postProcessModelsEnum, postProcessOperationsWithModels, postProcessParameter, postProcessSupportingFileData, processCompiler, processOpenAPI, processTemplatingEngine, processTestExampleData, removeImport, removeNonNameElementToCamelCase, removeNonNameElementToCamelCase, removeOption, removeSelfReferenceImports, reservedWords, reservedWordsMappings, sanitizeName, sanitizeName, sanitizeName, sanitizeTag, schemaMapping, serverVariableOverrides, setAddProps, setAllowUnicodeIdentifiers, setApiNamePrefix, setApiNameSuffix, setApiPackage, setCircularReferences, setDisallowAdditionalPropertiesIfNotPresent, setDocExtension, setEnableMinimalUpdate, setEnablePostProcessFile, setEnsureUniqueParams, setEnumUnknownDefaultCase, setFilesMetadataFilename, setGitHost, setGitRepoId, setGitUserId, setHideGenerationTimestamp, setHttpUserAgent, setIgnoreFilePathOverride, setInputSpec, setLegacyDiscriminatorBehavior, setLibrary, setModelNamePrefix, setModelNameSuffix, setModelPackage, setNonArrayMapProperty, setOpenAPI, setOutputDir, setParameterBooleanFlagWithCodegenProperty, setParameterEncodingValues, setParameterExamples, setParameterExampleValue, setParameterExampleValue, setParameterNullable, setPrependFormOrBodyParameters, setReleaseNote, setRemoveEnumValuePrefix, setRemoveOperationIdPrefix, setRemoveOperationIdPrefixCount, setRemoveOperationIdPrefixDelimiter, setReservedWordsLowerCase, setSkipOperationExample, setSkipOverwrite, setSortModelPropertiesByRequiredFlag, setSortParamsByRequiredFlag, setStrictSpecBehavior, setTemplateDir, setTemplatingEngine, setUseOneOfInterfaces, setVersionMetadataFilename, shouldAddImport, shouldOverwrite, supportedLibraries, supportingFiles, templateDir, testPackage, toAllOfName, toAnyOfName, toApiFilename, toApiImport, toApiName, toApiTestFilename, toApiVarName, toArrayModelParamName, toBooleanGetter, toDefaultParameterValue, toDefaultParameterValue, toDefaultValue, toDefaultValue, toDefaultValueWithParam, toEnumDefaultValue, toEnumName, toEnumValue, toEnumVarName, toExamples, toExampleValue, toGetter, toInstantiationType, toMediaTypeSchemaName, toModelImport, toModelImportMap, toModelName, toModelTestFilename, toOneOfName, toParamName, toRegularExpression, toSetter, toTestCaseName, toVarName, 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, 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, apiDocFilename, apiDocTemplateFiles, apiFilename, apiPackage, apiTemplateFiles, apiTestFileFolder, apiTestFilename, apiTestTemplateFiles, cliOptions, defaultIncludes, defaultTemplatingEngine, embeddedTemplateDir, encodePath, escapeTextWhileAllowingNewLines, fileSuffix, fromModel, fromSecurity, fromServers, fromServerVariables, generateExamplePath, generatorLanguageVersion, getAddSuffixToDuplicateOperationNicknames, getDocExtension, getFeatureSet, getFilesMetadataFilename, getGeneratorMetadata, getGitHost, getGitRepoId, getGitUserId, getHttpUserAgent, getIgnoreFilePathOverride, getInputSpec, getLibrary, getOutputDir, getReleaseNote, getSupportedVendorExtensions, getTemplatingEngine, getTypeDeclaration, getUseInlineModelResolver, getUseOpenAPINormalizer, getVersionMetadataFilename, importMapping, inlineSchemaNameMapping, inlineSchemaOption, instantiationTypes, isEnableMinimalUpdate, isEnablePostProcessFile, isHideGenerationTimestamp, isRemoveEnumValuePrefix, isRemoveOperationIdPrefix, isSkipOperationExample, isSkipOverwrite, isStrictSpecBehavior, languageSpecificPrimitives, modelDocTemplateFiles, modelFilename, modelNameMapping, modelPackage, modelTemplateFiles, modelTestFileFolder, modelTestTemplateFiles, nameMapping, openapiNormalizer, outputFolder, parameterNameMapping, postProcess, postProcessAllModels, postProcessFile, postProcessModelProperty, postProcessModels, postProcessOperationsWithModels, postProcessParameter, postProcessSupportingFileData, 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, setStrictSpecBehavior, setTemplatingEngine, shouldOverwrite, supportedLibraries, supportingFiles, templateDir, testPackage, toApiFilename, toApiImport, toApiName, toApiTestFilename, toApiVarName, toBooleanGetter, toGetter, toModelImport, toModelImportMap, toModelName, toModelTestFilename, toParamName, toSetter, typeMapping, unaliasSchema, updateAllModels, vendorExtensions
-
-
-
-
Field Detail
-
apiVersion
protected String apiVersion
-
curlOptions
protected String curlOptions
-
processMarkdown
protected boolean processMarkdown
-
scriptName
protected String scriptName
-
generateBashCompletion
protected boolean generateBashCompletion
-
generateZshCompletion
protected boolean generateZshCompletion
-
hostEnvironmentVariable
protected String hostEnvironmentVariable
-
basicAuthEnvironmentVariable
protected String basicAuthEnvironmentVariable
-
apiKeyAuthEnvironmentVariable
protected String apiKeyAuthEnvironmentVariable
-
apiDocPath
protected String apiDocPath
-
modelDocPath
protected String modelDocPath
-
emptyMethodNameCounter
protected static int emptyMethodNameCounter
-
CURL_OPTIONS
public static final String CURL_OPTIONS
- See Also:
- Constant Field Values
-
PROCESS_MARKDOWN
public static final String PROCESS_MARKDOWN
- See Also:
- Constant Field Values
-
SCRIPT_NAME
public static final String SCRIPT_NAME
- See Also:
- Constant Field Values
-
GENERATE_BASH_COMPLETION
public static final String GENERATE_BASH_COMPLETION
- See Also:
- Constant Field Values
-
GENERATE_ZSH_COMPLETION
public static final String GENERATE_ZSH_COMPLETION
- See Also:
- Constant Field Values
-
HOST_ENVIRONMENT_VARIABLE_NAME
public static final String HOST_ENVIRONMENT_VARIABLE_NAME
- See Also:
- Constant Field Values
-
BASIC_AUTH_ENVIRONMENT_VARIABLE_NAME
public static final String BASIC_AUTH_ENVIRONMENT_VARIABLE_NAME
- See Also:
- Constant Field Values
-
APIKEY_AUTH_ENVIRONMENT_VARIABLE_NAME
public static final String APIKEY_AUTH_ENVIRONMENT_VARIABLE_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
getTag
public CodegenType getTag()
Configures the type of generator.- Specified by:
getTag
in interfaceCodegenConfig
- Overrides:
getTag
in classDefaultCodegen
- Returns:
- the CodegenType for this generator
-
getName
public String getName()
Configures a friendly name for the generator. This will be used by the generator to select the library with the -g flag.- Specified by:
getName
in interfaceCodegenConfig
- Overrides:
getName
in classDefaultCodegen
- Returns:
- the friendly name for the generator
-
getHelp
public String getHelp()
Returns human-friendly help for the generator. Provide the consumer with help tips, parameters here- Specified by:
getHelp
in interfaceCodegenConfig
- Overrides:
getHelp
in classDefaultCodegen
- Returns:
- A string value for the help message
-
processOpts
public void processOpts()
- Specified by:
processOpts
in interfaceCodegenConfig
- Overrides:
processOpts
in classDefaultCodegen
-
setCurlOptions
public void setCurlOptions(String curlOptions)
-
setProcessMarkdown
public void setProcessMarkdown(boolean processMarkdown)
-
setScriptName
public void setScriptName(String scriptName)
-
setGenerateBashCompletion
public void setGenerateBashCompletion(boolean generateBashCompletion)
-
setGenerateZshCompletion
public void setGenerateZshCompletion(boolean generateZshCompletion)
-
setHostEnvironmentVariable
public void setHostEnvironmentVariable(String hostEnvironmentVariable)
-
setBasicAuthEnvironmentVariable
public void setBasicAuthEnvironmentVariable(String basicAuthEnvironmentVariable)
-
setApiKeyAuthEnvironmentVariable
public void setApiKeyAuthEnvironmentVariable(String apiKeyAuthEnvironmentVariable)
-
escapeReservedWord
public String escapeReservedWord(String name)
Escapes a reserved word as defined in the `reservedWords` array. Handle escaping those terms here. This logic is only called if a variable matches the reserved words.- Specified by:
escapeReservedWord
in interfaceCodegenConfig
- Overrides:
escapeReservedWord
in classDefaultCodegen
- Parameters:
name
- the name to be escaped- Returns:
- the escaped term
-
modelFileFolder
public String modelFileFolder()
Location to write model files. You can use the modelPackage() as defined when the class is instantiated.- Specified by:
modelFileFolder
in interfaceCodegenConfig
- Overrides:
modelFileFolder
in classDefaultCodegen
-
apiFileFolder
public String apiFileFolder()
Location to write api files. You can use the apiPackage() as defined when the class is instantiated.- Specified by:
apiFileFolder
in interfaceCodegenConfig
- Overrides:
apiFileFolder
in classDefaultCodegen
-
apiDocFileFolder
public String apiDocFileFolder()
- Specified by:
apiDocFileFolder
in interfaceCodegenConfig
- Overrides:
apiDocFileFolder
in classDefaultCodegen
-
modelDocFileFolder
public String modelDocFileFolder()
- Specified by:
modelDocFileFolder
in interfaceCodegenConfig
- Overrides:
modelDocFileFolder
in classDefaultCodegen
-
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
-
getTypeDeclaration
public String getTypeDeclaration(io.swagger.v3.oas.models.media.Schema p)
Optional - type declaration. This is a String which is used by the templates to instantiate your types. There is typically special handling for different property types- Specified by:
getTypeDeclaration
in interfaceCodegenConfig
- Overrides:
getTypeDeclaration
in classDefaultCodegen
- Parameters:
p
- property schema- Returns:
- a string value used as the `dataType` field for model templates, `returnType` for api templates
-
getSchemaType
public String getSchemaType(io.swagger.v3.oas.models.media.Schema p)
Optional - schema type conversion. This is used to map OpenAPI types in a `Property` into either language specific types via `typeMapping` or into complex models if there is not a mapping.- Overrides:
getSchemaType
in classDefaultCodegen
- Parameters:
p
- property schema- Returns:
- a string value of the type or complex model for this property
- See Also:
Schema
-
fromParameter
public CodegenParameter fromParameter(io.swagger.v3.oas.models.parameters.Parameter param, Set<String> imports)
Convert OpenAPI Parameter object to Codegen Parameter object- Overrides:
fromParameter
in classDefaultCodegen
- Parameters:
imports
- set of imports for library/package/moduleparam
- OpenAPI parameter object- Returns:
- Codegen Parameter object
-
escapeText
public String escapeText(String input)
Override with any special text escaping logic- Specified by:
escapeText
in interfaceCodegenConfig
- Overrides:
escapeText
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)
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
-
fromOperation
public CodegenOperation fromOperation(String path, String httpMethod, io.swagger.v3.oas.models.Operation operation, List<io.swagger.v3.oas.models.servers.Server> servers)
Description copied from class:DefaultCodegen
Convert OAS Operation object to Codegen Operation object- Specified by:
fromOperation
in interfaceCodegenConfig
- Overrides:
fromOperation
in classDefaultCodegen
- Parameters:
path
- the path of the operationhttpMethod
- HTTP methodoperation
- OAS operation objectservers
- list of servers- Returns:
- Codegen Operation object
-
preprocessOpenAPI
public void preprocessOpenAPI(io.swagger.v3.oas.models.OpenAPI openAPI)
Preprocess original properties from the OpenAPI definition where necessary.- Specified by:
preprocessOpenAPI
in interfaceCodegenConfig
- Overrides:
preprocessOpenAPI
in classDefaultCodegen
- Parameters:
openAPI
- [description]
-
setParameterExampleValue
public void setParameterExampleValue(CodegenParameter p)
Description copied from class:DefaultCodegen
Return the example value of the parameter.- Overrides:
setParameterExampleValue
in classDefaultCodegen
- Parameters:
p
- Codegen parameter
-
toModelFilename
public String toModelFilename(String name)
Description copied from class:DefaultCodegen
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
-
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
-
generatorLanguage
public GeneratorLanguage generatorLanguage()
- Specified by:
generatorLanguage
in interfaceCodegenConfig
- Overrides:
generatorLanguage
in classDefaultCodegen
-
-