Class GdscriptClientCodegen
- java.lang.Object
-
- org.openapitools.codegen.DefaultCodegen
-
- org.openapitools.codegen.languages.GdscriptClientCodegen
-
- All Implemented Interfaces:
CodegenConfig
public class GdscriptClientCodegen extends DefaultCodegen implements CodegenConfig
-
-
Field Summary
Fields Modifier and Type Field Description static StringANTICOLLISION_PREFIXstatic StringANTICOLLISION_PREFIX_VALUEstatic StringANTICOLLISION_SUFFIXstatic StringANTICOLLISION_SUFFIX_VALUEprotected StringanticollisionPrefixprotected StringanticollisionSuffixprotected StringapiDocPathstatic StringCORE_NAME_PREFIXstatic StringCORE_NAME_PREFIX_VALUEstatic StringCORE_NAME_SUFFIXstatic StringCORE_NAME_SUFFIX_VALUEprotected StringcoreNamePrefixprotected StringcoreNameSuffixprotected StringmodelDocPath-
Fields inherited from class org.openapitools.codegen.DefaultCodegen
additionalProperties, addOneOfInterfaceImports, addOneOfInterfaces, addSuffixToDuplicateOperationNicknames, allowUnicodeIdentifiers, apiDocTemplateFiles, apiNamePrefix, apiNameSuffix, apiPackage, apiTemplateFiles, apiTestTemplateFiles, autosetConstants, cliOptions, DefaultFeatureSet, defaultIncludes, defaultToEmptyContainer, 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 GdscriptClientCodegen()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringapiDocFileFolder()StringdefaultTemplatingEngine()StringescapeQuotationMark(String input)Escape single and/or double quote to avoid code injectionStringescapeReservedWord(String name)Return the escaped name of the reserved wordStringescapeStringLiteral(String input)StringescapeUnsafeCharacters(String input)override with any special text escaping logic to handle unsafe characters so as to avoid code injectionStringgetAnticollisionPrefix()StringgetAnticollisionSuffix()StringgetCoreNamePrefix()StringgetCoreNameSuffix()StringgetHelp()StringgetName()protected List<String>getReservedWords()CodegenTypegetTag()StringgetTypeDeclaration(io.swagger.v3.oas.models.media.Schema schema)Output the language-specific type declaration of the property.StringmodelDocFileFolder()voidprocessAdditionalProperties()voidprocessOpts()voidsetAnticollisionPrefix(String anticollisionPrefix)voidsetAnticollisionSuffix(String anticollisionSuffix)voidsetCoreNamePrefix(String prefix)voidsetCoreNameSuffix(String coreNameSuffix)StringtoCoreFilename(String name)StringtoDefaultValue(io.swagger.v3.oas.models.media.Schema schema)Return the default value of the propertyStringtoExampleValue(io.swagger.v3.oas.models.media.Schema schema)Return the example value of the propertyStringtoModelFilename(String name)Return the capitalized file name of the modelMap<String,ModelsMap>updateAllModels(Map<String,ModelsMap> objs)Loop through all models to update different flags (e.g. isSelfReference), children models, etc and update mapped models for import.-
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, apiDocFilename, apiDocTemplateFiles, apiFileFolder, apiFilename, apiFilename, apiPackage, apiTemplateFiles, apiTestFileFolder, apiTestFilename, apiTestTemplateFiles, buildEnumVars, buildLibraryCliOption, cliOptions, convertPropertyToBoolean, convertPropertyToBooleanAndWriteBack, convertPropertyToBooleanAndWriteBack, convertPropertyToStringAndWriteBack, convertPropertyToTypeAndWriteBack, createDiscriminator, defaultIncludes, embeddedTemplateDir, encodePath, enumNameMapping, escapeText, escapeTextInSingleQuotes, escapeTextWhileAllowingNewLines, executePostProcessor, fileSuffix, findCommonPrefixOfVars, findMethodResponse, fromCallback, fromFormProperty, fromModel, fromOperation, fromParameter, fromProperty, fromProperty, fromProperty, fromRequestBody, fromRequestBodyToFormParameters, fromResponse, fromSecurity, fromServers, fromServerVariables, generateExamplePath, generateJSONSpecFile, generateYAMLSpecFile, generatorLanguage, 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, getSchemaType, getSingleSchemaType, getSupportedVendorExtensions, getSymbolName, getTemplatingEngine, getterAndSetterCapitalize, getTypeDeclaration, getUseInlineModelResolver, getUseOneOfInterfaces, getUseOpenapiNormalizer, getVersionMetadataFilename, handleConstantParams, handleMethodResponse, handleMethodResponse, handleSpecialCharacters, hasBodyParameter, hasFormParameter, importMapping, initializeSpecialCharacterMapping, inlineSchemaNameMapping, inlineSchemaOption, instantiationTypes, isDataTypeBinary, isDataTypeFile, isDataTypeString, isEnableMinimalUpdate, isEnablePostProcessFile, isHideGenerationTimestamp, isJsonMimeType, isJsonVendorMimeType, isLibrary, isParameterNameUnique, isPropertyInnerMostEnum, isRemoveEnumValuePrefix, isRemoveOperationIdPrefix, isReservedWord, isSkipOperationExample, isSkipOverwrite, isSkipSortingOperations, isStrictSpecBehavior, isTypeErasedGenerics, isXmlMimeType, languageSpecificPrimitives, lowerCamelCase, modelDocTemplateFiles, modelFileFolder, modelFilename, modelFilename, modelNameMapping, modelPackage, modelTemplateFiles, modelTestFileFolder, modelTestTemplateFiles, modifyFeatureSet, nameMapping, needToImport, openapiGeneratorIgnoreList, openapiNormalizer, operationIdNameMapping, outputFolder, parameterNameMapping, postProcess, postProcessAllModels, postProcessEnumVars, postProcessFile, postProcessModelProperty, postProcessModels, postProcessModelsEnum, postProcessOperationsWithModels, 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, toApiDocFilename, toApiFilename, toApiImport, toApiName, toApiTestFilename, toApiVarName, toArrayModelParamName, toBooleanGetter, toDefaultParameterValue, toDefaultParameterValue, toDefaultValue, toDefaultValueWithParam, toEnumDefaultValue, toEnumDefaultValue, toEnumName, toEnumValue, toEnumVarName, toExamples, toGetter, toInstantiationType, toMediaTypeSchemaName, toModelDocFilename, toModelImport, toModelImportMap, toModelName, toModelTestFilename, toOneOfName, toOperationId, toParamName, toRegularExpression, toSetter, toTestCaseName, toVarName, typeMapping, unaliasPropertySchema, unaliasSchema, 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, apiDocFilename, apiDocTemplateFiles, apiFileFolder, apiFilename, apiFilename, apiPackage, apiTemplateFiles, apiTestFileFolder, apiTestFilename, apiTestTemplateFiles, cliOptions, defaultIncludes, embeddedTemplateDir, encodePath, enumNameMapping, escapeText, escapeTextWhileAllowingNewLines, fileSuffix, fromModel, fromOperation, fromSecurity, fromServers, fromServerVariables, generateExamplePath, generatorLanguage, 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, modelDocTemplateFiles, modelFileFolder, modelFilename, modelFilename, modelNameMapping, modelPackage, modelTemplateFiles, modelTestFileFolder, modelTestTemplateFiles, nameMapping, openapiGeneratorIgnoreList, openapiNormalizer, operationIdNameMapping, outputFolder, parameterNameMapping, postProcess, postProcessAllModels, postProcessFile, postProcessModelProperty, postProcessModels, postProcessOperationsWithModels, 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, toApiDocFilename, toApiFilename, toApiImport, toApiName, toApiTestFilename, toApiVarName, toBooleanGetter, toGetter, toModelDocFilename, toModelImport, toModelImportMap, toModelName, toModelTestFilename, toParamName, toSetter, typeMapping, unaliasSchema, vendorExtensions
-
-
-
-
Field Detail
-
CORE_NAME_PREFIX
public static final String CORE_NAME_PREFIX
- See Also:
- Constant Field Values
-
CORE_NAME_PREFIX_VALUE
public static final String CORE_NAME_PREFIX_VALUE
- See Also:
- Constant Field Values
-
CORE_NAME_SUFFIX
public static final String CORE_NAME_SUFFIX
- See Also:
- Constant Field Values
-
CORE_NAME_SUFFIX_VALUE
public static final String CORE_NAME_SUFFIX_VALUE
- See Also:
- Constant Field Values
-
ANTICOLLISION_PREFIX
public static final String ANTICOLLISION_PREFIX
- See Also:
- Constant Field Values
-
ANTICOLLISION_PREFIX_VALUE
public static final String ANTICOLLISION_PREFIX_VALUE
- See Also:
- Constant Field Values
-
ANTICOLLISION_SUFFIX
public static final String ANTICOLLISION_SUFFIX
- See Also:
- Constant Field Values
-
ANTICOLLISION_SUFFIX_VALUE
public static final String ANTICOLLISION_SUFFIX_VALUE
- See Also:
- Constant Field Values
-
coreNamePrefix
protected String coreNamePrefix
-
coreNameSuffix
protected String coreNameSuffix
-
anticollisionPrefix
protected String anticollisionPrefix
-
anticollisionSuffix
protected String anticollisionSuffix
-
apiDocPath
protected String apiDocPath
-
modelDocPath
protected String modelDocPath
-
-
Method Detail
-
setCoreNamePrefix
public void setCoreNamePrefix(String prefix)
-
getCoreNamePrefix
public String getCoreNamePrefix()
-
setCoreNameSuffix
public void setCoreNameSuffix(String coreNameSuffix)
-
getCoreNameSuffix
public String getCoreNameSuffix()
-
setAnticollisionPrefix
public void setAnticollisionPrefix(String anticollisionPrefix)
-
getAnticollisionPrefix
public String getAnticollisionPrefix()
-
setAnticollisionSuffix
public void setAnticollisionSuffix(String anticollisionSuffix)
-
getAnticollisionSuffix
public String getAnticollisionSuffix()
-
getTag
public CodegenType getTag()
- Specified by:
getTagin interfaceCodegenConfig- Overrides:
getTagin classDefaultCodegen
-
getName
public String getName()
- Specified by:
getNamein interfaceCodegenConfig- Overrides:
getNamein classDefaultCodegen
-
getHelp
public String getHelp()
- Specified by:
getHelpin interfaceCodegenConfig- Overrides:
getHelpin classDefaultCodegen
-
defaultTemplatingEngine
public String defaultTemplatingEngine()
- Specified by:
defaultTemplatingEnginein interfaceCodegenConfig- Overrides:
defaultTemplatingEnginein classDefaultCodegen
-
processAdditionalProperties
public void processAdditionalProperties()
-
processOpts
public void processOpts()
- Specified by:
processOptsin interfaceCodegenConfig- Overrides:
processOptsin classDefaultCodegen
-
apiDocFileFolder
public String apiDocFileFolder()
- Specified by:
apiDocFileFolderin interfaceCodegenConfig- Overrides:
apiDocFileFolderin classDefaultCodegen
-
modelDocFileFolder
public String modelDocFileFolder()
- Specified by:
modelDocFileFolderin interfaceCodegenConfig- Overrides:
modelDocFileFolderin classDefaultCodegen
-
escapeUnsafeCharacters
public String escapeUnsafeCharacters(String input)
Description copied from class:DefaultCodegenoverride with any special text escaping logic to handle unsafe characters so as to avoid code injection- Specified by:
escapeUnsafeCharactersin interfaceCodegenConfig- Overrides:
escapeUnsafeCharactersin classDefaultCodegen- Parameters:
input- String to be cleaned up- Returns:
- string with unsafe characters removed or escaped
-
escapeQuotationMark
public String escapeQuotationMark(String input)
Description copied from class:DefaultCodegenEscape single and/or double quote to avoid code injection- Specified by:
escapeQuotationMarkin interfaceCodegenConfig- Overrides:
escapeQuotationMarkin classDefaultCodegen- Parameters:
input- String to be cleaned up- Returns:
- string with quotation mark removed or escaped
-
escapeReservedWord
public String escapeReservedWord(String name)
Description copied from class:DefaultCodegenReturn the escaped name of the reserved word- Specified by:
escapeReservedWordin interfaceCodegenConfig- Overrides:
escapeReservedWordin classDefaultCodegen- Parameters:
name- the name to be escaped- Returns:
- the escaped reserved word
throws Runtime exception as reserved word is not allowed (default behavior)
-
toModelFilename
public String toModelFilename(String name)
Description copied from class:DefaultCodegenReturn the capitalized file name of the model- Specified by:
toModelFilenamein interfaceCodegenConfig- Overrides:
toModelFilenamein classDefaultCodegen- Parameters:
name- the model name- Returns:
- the file name of the model
-
toExampleValue
public String toExampleValue(io.swagger.v3.oas.models.media.Schema schema)
Description copied from class:DefaultCodegenReturn the example value of the propertyThis method should be overridden in the generator to meet its requirement.
- Overrides:
toExampleValuein classDefaultCodegen- Parameters:
schema- Property schema- Returns:
- string presentation of the example value of the property
-
toDefaultValue
public String toDefaultValue(io.swagger.v3.oas.models.media.Schema schema)
Description copied from class:DefaultCodegenReturn 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:
toDefaultValuein classDefaultCodegen- Parameters:
schema- Property schema- Returns:
- string presentation of the default value of the property
-
getTypeDeclaration
public String getTypeDeclaration(io.swagger.v3.oas.models.media.Schema schema)
Description copied from class:DefaultCodegenOutput the language-specific type declaration of the property.- Specified by:
getTypeDeclarationin interfaceCodegenConfig- Overrides:
getTypeDeclarationin classDefaultCodegen- Parameters:
schema- property schema- Returns:
- a string presentation of the property type
-
updateAllModels
public Map<String,ModelsMap> updateAllModels(Map<String,ModelsMap> objs)
Description copied from class:DefaultCodegenLoop through all models to update different flags (e.g. isSelfReference), children models, etc and update mapped models for import.- Specified by:
updateAllModelsin interfaceCodegenConfig- Overrides:
updateAllModelsin classDefaultCodegen- Parameters:
objs- Map of models- Returns:
- maps of models with various updates
-
-