Class PhpDataTransferClientCodegen
- java.lang.Object
-
- org.openapitools.codegen.DefaultCodegen
-
- org.openapitools.codegen.languages.AbstractPhpCodegen
-
- org.openapitools.codegen.languages.PhpDataTransferClientCodegen
-
- All Implemented Interfaces:
CodegenConfig
public class PhpDataTransferClientCodegen extends AbstractPhpCodegen
-
-
Field Summary
Fields Modifier and Type Field Description static String
OPT_MODERN
static String
VEN_COLLECTION_FORMAT
static String
VEN_CONTAINER_DATA_TYPE
static String
VEN_FROM_CONTAINER
static String
VEN_FROM_PARAMETERS
static String
VEN_HAS_PARAMETER_DATA
static String
VEN_PARAMETER_DATA_TYPE
static String
VEN_PARAMETER_LOCATION
-
Fields inherited from class org.openapitools.codegen.languages.AbstractPhpCodegen
abstractNamePrefix, abstractNameSuffix, apiDirName, apiDocPath, artifactVersion, docsBasePath, interfaceNamePrefix, interfaceNameSuffix, invokerPackage, modelDirName, modelDocPath, PACKAGE_NAME, packageName, SRC_BASE_PATH, srcBasePath, testBasePath, traitNamePrefix, traitNameSuffix, VARIABLE_NAMING_CONVENTION, variableNamingConvention
-
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, inlineSchemaNameDefault, inlineSchemaNameMapping, inputSpec, instantiationTypes, JSON_MIME_PATTERN, JSON_VENDOR_MIME_PATTERN, languageSpecificPrimitives, legacyDiscriminatorBehavior, library, loadDeepObjectIntoItems, modelDocTemplateFiles, modelNamePrefix, modelNameSuffix, modelPackage, modelTemplateFiles, modelTestTemplateFiles, openAPI, openapiNormalizer, outputFolder, 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
-
-
Constructor Summary
Constructors Constructor Description PhpDataTransferClientCodegen()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addInternalExtensionToOperation(io.swagger.v3.oas.models.Operation operation, String name, Object value)
protected void
addInternalExtensionToSchema(io.swagger.v3.oas.models.media.Schema schema, String name, Object value)
void
addOperationToGroup(String tag, String resourcePath, io.swagger.v3.oas.models.Operation operation, CodegenOperation co, Map<String,List<CodegenOperation>> operations)
Add operation to groupprotected io.swagger.v3.oas.models.media.Schema
convertParameterToSchema(io.swagger.v3.oas.models.OpenAPI openAPI, io.swagger.v3.oas.models.parameters.Parameter parameter)
protected io.swagger.v3.oas.models.media.Content
copyWithQuotedMediaTypes(io.swagger.v3.oas.models.media.Content content)
protected void
generateContainerSchemas(io.swagger.v3.oas.models.OpenAPI openAPI)
Generate additional model definitions for containers in whole specificationprotected void
generateContainerSchemas(io.swagger.v3.oas.models.OpenAPI openAPI, Set<io.swagger.v3.oas.models.media.Schema> visitedSchemas, io.swagger.v3.oas.models.media.Schema schema)
Generate additional model definitions for containers in specified schemaprotected void
generateParameterSchemas(io.swagger.v3.oas.models.OpenAPI openAPI)
Generate additional model definitions from query parametersprotected String
generateUniqueSchemaName(io.swagger.v3.oas.models.OpenAPI openAPI, String name)
protected String
getContentType(io.swagger.v3.oas.models.parameters.RequestBody requestBody)
String
getHelp()
String
getName()
CodegenType
getTag()
String
getTypeDeclaration(io.swagger.v3.oas.models.media.Schema p)
Output the language-specific type declaration of the property.void
preprocessOpenAPI(io.swagger.v3.oas.models.OpenAPI openAPI)
void
processOpenAPI(io.swagger.v3.oas.models.OpenAPI openAPI)
void
processOpts()
protected void
quoteMediaTypes(io.swagger.v3.oas.models.OpenAPI openAPI)
Awfully nasty workaround - add quotation marks for all media types to prevent special treatment of form media types in org/openapitools/codegen/DefaultGenerator.java:873 TODO find a better way to prevent special form media type treatmentString
toApiName(String name)
Output the API (class) name (capitalized) ending with the specified or default suffix Return DefaultApi if name is emptyString
toSrcPath(String packageName, String basePath)
-
Methods inherited from class org.openapitools.codegen.languages.AbstractPhpCodegen
apiDocFileFolder, apiFileFolder, apiTestFileFolder, escapeMediaType, escapeQuotationMark, escapeReservedWord, escapeText, escapeUnsafeCharacters, extractSimpleName, generatorLanguage, getComposerPackageName, getInvokerPackage, getPackageName, getSchemaType, getTypeDeclaration, isDataTypeString, modelDocFileFolder, modelFileFolder, modelTestFileFolder, postProcessFile, postProcessModels, postProcessOperationsWithModels, setArtifactVersion, setInvokerPackage, setPackageName, setParameterExampleValue, setParameterNamingConvention, setSrcBasePath, toAbstractName, toApiDocFilename, toDefaultValue, toEnumDefaultValue, toEnumName, toEnumValue, toEnumVarName, toInterfaceName, toModelDocFilename, toModelFilename, toModelName, toModelTestFilename, toOperationId, toParamName, toTraitName, toVarName
-
Methods inherited from class org.openapitools.codegen.DefaultCodegen
addAdditionPropertiesToCodeGenModel, addBodyModelSchema, addHeaders, addImport, addImport, addImport, addImports, addImports, addImports, addImportsForPropertyType, addImportsToOneOfInterface, additionalProperties, addMustacheLambdas, addOneOfInterfaceModel, addOneOfNameExtension, addOption, addOption, addParentContainer, addProperties, addRegularExpressionDelimiter, addRequiredVarsMap, addSwitch, addVars, addVars, addVarsRequiredVarsAdditionalProps, apiDocFilename, apiDocTemplateFiles, apiFilename, apiPackage, apiTemplateFiles, apiTestFilename, apiTestTemplateFiles, buildEnumVars, buildLibraryCliOption, cliOptions, convertPropertyToBoolean, convertPropertyToBooleanAndWriteBack, createDiscriminator, defaultIncludes, defaultTemplatingEngine, embeddedTemplateDir, encodePath, escapeTextWhileAllowingNewLines, fileSuffix, findCommonPrefixOfVars, findMethodResponse, fromCallback, fromFormProperty, fromModel, fromOperation, fromParameter, fromProperty, fromProperty, fromProperty, fromRequestBody, fromRequestBodyToFormParameters, fromResponse, fromSecurity, fromServers, fromServerVariables, generateExamplePath, generateJSONSpecFile, generateYAMLSpecFile, generatorLanguageVersion, getAdditionalProperties, getAdditionalPropertiesName, getAddSuffixToDuplicateOperationNicknames, getAlias, getAllModels, getAllOfDescendants, getAllowUnicodeIdentifiers, getApiNamePrefix, getApiNameSuffix, getCollectionFormat, getCollectionFormat, getConsumesInfo, getContent, 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, getUseInlineModelResolver, getUseOneOfInterfaces, getUseOpenAPINormalizer, getVersionMetadataFilename, handleMethodResponse, handleMethodResponse, handleSpecialCharacters, hasBodyParameter, hasFormParameter, importMapping, initializeSpecialCharacterMapping, inlineSchemaNameDefault, inlineSchemaNameMapping, instantiationTypes, isAnyTypeSchema, isDataTypeBinary, isDataTypeFile, isEnableMinimalUpdate, isEnablePostProcessFile, isFreeFormObject, isHideGenerationTimestamp, isJsonMimeType, isJsonVendorMimeType, isLibrary, isParameterNameUnique, isPropertyInnerMostEnum, isRemoveEnumValuePrefix, isRemoveOperationIdPrefix, isReservedWord, isSkipOperationExample, isSkipOverwrite, isStrictSpecBehavior, languageSpecificPrimitives, lowerCamelCase, modelDocTemplateFiles, modelFilename, modelPackage, modelTemplateFiles, modelTestTemplateFiles, modifyFeatureSet, needToImport, openapiNormalizer, outputFolder, postProcess, postProcessAllModels, postProcessModelProperty, postProcessModelsEnum, postProcessParameter, postProcessSupportingFileData, processCompiler, 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, toApiTestFilename, toApiVarName, toArrayModelParamName, toBooleanGetter, toDefaultParameterValue, toDefaultParameterValue, toDefaultValue, toDefaultValueWithParam, toExamples, toExampleValue, toGetter, toInstantiationType, toMediaTypeSchemaName, toModelImport, toModelImportMap, 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, 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, apiDocFilename, apiDocTemplateFiles, apiFilename, apiPackage, apiTemplateFiles, apiTestFilename, apiTestTemplateFiles, cliOptions, defaultIncludes, defaultTemplatingEngine, embeddedTemplateDir, encodePath, escapeTextWhileAllowingNewLines, fileSuffix, fromModel, fromOperation, fromSecurity, fromServers, fromServerVariables, generateExamplePath, generatorLanguageVersion, getAddSuffixToDuplicateOperationNicknames, getDocExtension, getFeatureSet, getFilesMetadataFilename, getGeneratorMetadata, getGitHost, getGitRepoId, getGitUserId, getHttpUserAgent, getIgnoreFilePathOverride, getInputSpec, getLibrary, getOutputDir, getReleaseNote, getSupportedVendorExtensions, getTemplatingEngine, getUseInlineModelResolver, getUseOpenAPINormalizer, getVersionMetadataFilename, importMapping, inlineSchemaNameDefault, inlineSchemaNameMapping, instantiationTypes, isEnableMinimalUpdate, isEnablePostProcessFile, isHideGenerationTimestamp, isRemoveEnumValuePrefix, isRemoveOperationIdPrefix, isSkipOperationExample, isSkipOverwrite, isStrictSpecBehavior, languageSpecificPrimitives, modelDocTemplateFiles, modelFilename, modelPackage, modelTemplateFiles, modelTestTemplateFiles, openapiNormalizer, outputFolder, postProcess, postProcessAllModels, postProcessModelProperty, postProcessParameter, postProcessSupportingFileData, processCompiler, 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, toApiTestFilename, toApiVarName, toBooleanGetter, toGetter, toModelImport, toModelImportMap, toSetter, typeMapping, unaliasSchema, updateAllModels, vendorExtensions
-
-
-
-
Field Detail
-
OPT_MODERN
public static final String OPT_MODERN
- See Also:
- Constant Field Values
-
VEN_PARAMETER_LOCATION
public static final String VEN_PARAMETER_LOCATION
- See Also:
- Constant Field Values
-
VEN_FROM_PARAMETERS
public static final String VEN_FROM_PARAMETERS
- See Also:
- Constant Field Values
-
VEN_COLLECTION_FORMAT
public static final String VEN_COLLECTION_FORMAT
- See Also:
- Constant Field Values
-
VEN_PARAMETER_DATA_TYPE
public static final String VEN_PARAMETER_DATA_TYPE
- See Also:
- Constant Field Values
-
VEN_HAS_PARAMETER_DATA
public static final String VEN_HAS_PARAMETER_DATA
- See Also:
- Constant Field Values
-
VEN_FROM_CONTAINER
public static final String VEN_FROM_CONTAINER
- See Also:
- Constant Field Values
-
VEN_CONTAINER_DATA_TYPE
public static final String VEN_CONTAINER_DATA_TYPE
- See Also:
- Constant Field Values
-
-
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 classAbstractPhpCodegen
-
toSrcPath
public String toSrcPath(String packageName, String basePath)
- Overrides:
toSrcPath
in classAbstractPhpCodegen
-
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
-
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 classAbstractPhpCodegen
- Parameters:
p
- property schema- Returns:
- a string presentation of the property type
-
addOperationToGroup
public void addOperationToGroup(String tag, String resourcePath, io.swagger.v3.oas.models.Operation operation, CodegenOperation co, Map<String,List<CodegenOperation>> operations)
Description copied from class:DefaultCodegen
Add operation to group- Specified by:
addOperationToGroup
in interfaceCodegenConfig
- Overrides:
addOperationToGroup
in classDefaultCodegen
- Parameters:
tag
- name of the tagresourcePath
- path of the resourceoperation
- OAS Operation objectco
- Codegen Operation objectoperations
- map of Codegen operations
-
getContentType
protected String getContentType(io.swagger.v3.oas.models.parameters.RequestBody requestBody)
- Overrides:
getContentType
in classDefaultCodegen
-
preprocessOpenAPI
public void preprocessOpenAPI(io.swagger.v3.oas.models.OpenAPI openAPI)
- Specified by:
preprocessOpenAPI
in interfaceCodegenConfig
- Overrides:
preprocessOpenAPI
in classDefaultCodegen
-
processOpenAPI
public void processOpenAPI(io.swagger.v3.oas.models.OpenAPI openAPI)
- Specified by:
processOpenAPI
in interfaceCodegenConfig
- Overrides:
processOpenAPI
in classDefaultCodegen
-
generateParameterSchemas
protected void generateParameterSchemas(io.swagger.v3.oas.models.OpenAPI openAPI)
Generate additional model definitions from query parameters- Parameters:
openAPI
- OpenAPI object
-
convertParameterToSchema
protected io.swagger.v3.oas.models.media.Schema convertParameterToSchema(io.swagger.v3.oas.models.OpenAPI openAPI, io.swagger.v3.oas.models.parameters.Parameter parameter)
-
addInternalExtensionToSchema
protected void addInternalExtensionToSchema(io.swagger.v3.oas.models.media.Schema schema, String name, Object value)
-
addInternalExtensionToOperation
protected void addInternalExtensionToOperation(io.swagger.v3.oas.models.Operation operation, String name, Object value)
-
generateUniqueSchemaName
protected String generateUniqueSchemaName(io.swagger.v3.oas.models.OpenAPI openAPI, String name)
-
generateContainerSchemas
protected void generateContainerSchemas(io.swagger.v3.oas.models.OpenAPI openAPI)
Generate additional model definitions for containers in whole specification- Parameters:
openAPI
- OpenAPI object
-
generateContainerSchemas
protected void generateContainerSchemas(io.swagger.v3.oas.models.OpenAPI openAPI, Set<io.swagger.v3.oas.models.media.Schema> visitedSchemas, io.swagger.v3.oas.models.media.Schema schema)
Generate additional model definitions for containers in specified schema- Parameters:
openAPI
- OpenAPI objectvisitedSchemas
- Set of Schemas that have been processed alreadyschema
- OAS schema to process
-
quoteMediaTypes
protected void quoteMediaTypes(io.swagger.v3.oas.models.OpenAPI openAPI)
Awfully nasty workaround - add quotation marks for all media types to prevent special treatment of form media types in org/openapitools/codegen/DefaultGenerator.java:873 TODO find a better way to prevent special form media type treatment- Parameters:
openAPI
- OpenAPI object
-
copyWithQuotedMediaTypes
protected io.swagger.v3.oas.models.media.Content copyWithQuotedMediaTypes(io.swagger.v3.oas.models.media.Content content)
-
-