Package org.apache.camel.model.rest
Class ParamDefinition
java.lang.Object
org.apache.camel.model.rest.ParamDefinition
To specify the rest operation parameters.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionallowableValues
(String allowableValues) Allowed values of the parameter when its an enum typeallowableValues
(String... allowableValues) Allowed values of the parameter when its an enum typeallowableValues
(List<String> allowableValues) Allowed values of the parameter when its an enum typeThe data type of the array data typecollectionFormat
(CollectionFormat collectionFormat) Sets the collection format.dataFormat
(String type) The data format of the parameter such as binary, date, date-time, password.The data type of the parameter such as string, integer, booleandefaultValue
(String name) The default value of the parameter.description
(String name) Description of the parameter.endParam()
Ends the configuration of this parameterAdds a single exampleAdds a body example with the given content-typeSets the parameter default value.getName()
getType()
Name of the parameter.Whether the parameter is requiredvoid
setAllowableValues
(List<ValueDefinition> allowableValues) Sets the parameter list of allowable values (enum).void
setArrayType
(String arrayType) Sets the parameter array type.void
setCollectionFormat
(CollectionFormat collectionFormat) Sets the parameter collection format.void
setDataFormat
(String dataFormat) Sets the parameter data format.void
setDataType
(String dataType) Sets the parameter data type.void
setDefaultValue
(String defaultValue) void
setDescription
(String description) Sets the parameter description.void
setExamples
(List<RestPropertyDefinition> examples) Sets the parameter examples.void
Sets the parameter name.void
setRequired
(Boolean required) Sets the parameter required flag.void
setType
(RestParamType type) Sets the parameter type.type
(RestParamType type) The parameter type such as body, form, header, path, query
-
Constructor Details
-
ParamDefinition
public ParamDefinition() -
ParamDefinition
-
-
Method Details
-
getType
-
setType
Sets the parameter type. -
getName
-
setName
Sets the parameter name. -
getDescription
-
setDescription
Sets the parameter description. -
getDefaultValue
Sets the parameter default value. -
setDefaultValue
-
getRequired
-
setRequired
Sets the parameter required flag. -
getCollectionFormat
-
setCollectionFormat
Sets the parameter collection format. -
getArrayType
-
setArrayType
Sets the parameter array type. Required if data type is "array". Describes the type of items in the array. -
getDataType
-
setDataType
Sets the parameter data type. -
getDataFormat
-
setDataFormat
Sets the parameter data format. -
getAllowableValues
-
setAllowableValues
Sets the parameter list of allowable values (enum). -
getExamples
-
setExamples
Sets the parameter examples. -
name
Name of the parameter. This option is mandatory. -
description
Description of the parameter. -
defaultValue
The default value of the parameter. -
required
Whether the parameter is required -
collectionFormat
Sets the collection format. -
arrayType
The data type of the array data type -
dataType
The data type of the parameter such as string, integer, boolean -
dataFormat
The data format of the parameter such as binary, date, date-time, password. The format is usually derived from the dataType alone. However you can set this option for more fine grained control of the format in use. -
allowableValues
Allowed values of the parameter when its an enum type -
allowableValues
Allowed values of the parameter when its an enum type -
allowableValues
Allowed values of the parameter when its an enum type -
type
The parameter type such as body, form, header, path, query -
example
Adds a body example with the given content-type -
example
Adds a single example -
endParam
Ends the configuration of this parameter -
getAllowableValuesAsStringList
-