Class Parameter
The Parameter Object describes a single parameter used in an API operation. Parameters can be passed in various locations including the path, query string, headers, or cookies. Each parameter has a name, location, and schema that defines its type and constraints.
OpenAPI Specification:
The Parameter Object is composed of the following fields:
- name (string, REQUIRED) - The name of the parameter
- in (string, REQUIRED) - The location of the parameter. Possible values:- "query" ,- "header" ,- "path" , or- "cookie" 
- description (string) - A brief description of the parameter (CommonMark syntax may be used)
- required (boolean) - Determines whether this parameter is mandatory (must be- true if- in is- "path" )
- deprecated (boolean) - Specifies that a parameter is deprecated
- allowEmptyValue (boolean) - Sets the ability to pass empty-valued parameters (valid only for- "query" parameters)
- style (string) - Describes how the parameter value will be serialized
- explode (boolean) - When true, parameter values of type array or object generate separate parameters for each value
- allowReserved (boolean) - Determines whether the parameter value should allow reserved characters
- schema (- SchemaInfo) - The schema defining the type used for the parameter
- example (any) - Example of the parameter's potential value
- examples (map of- Example) - Examples of the parameter's potential value
Example:
   
See Also:
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptioncopy()Makes a copy of this object.<T> TGeneric property getter.Returns the allow empty value flag.Returns the allow reserved flag.Returns the deprecated flag.Returns the description.Returns the example.Returns the examples map.Returns the explode flag.getIn()Returns the parameter location.getName()Returns the parameter name.Returns the required flag.Returns the schema.getStyle()Returns the style.keySet()Returns all the keys on this element.Generic property setter.setAllowEmptyValue(Boolean value) Sets the allow empty value flag.setAllowReserved(Boolean value) Sets the allow reserved flag.setDeprecated(Boolean value) Sets the deprecated flag.setDescription(String value) Sets the description.setExample(Object value) Sets the example.setExamples(Map<String, Example> value) Sets the examples map.setExplode(Boolean value) Sets the explode flag.Sets the parameter location.Sets the parameter name.setRequired(Boolean value) Sets the required flag.setSchema(SchemaInfo value) Sets the schema.Sets the style.strict()Sets strict mode on this bean.Sets strict mode on this bean.
- 
Constructor Details- 
Parameterpublic Parameter()Default constructor.
- 
ParameterCopy constructor.- Parameters:
- copyFrom- The object to copy.
 
 
- 
- 
Method Details- 
copyMakes a copy of this object.- Returns:
- A new copy of this object.
 
- 
getNameReturns the parameter name.- Returns:
- The parameter name.
 
- 
setNameSets the parameter name.- Parameters:
- value- The new value for this property.
- Returns:
- This object.
 
- 
getInReturns the parameter location.- Returns:
- The parameter location.
 
- 
setInSets the parameter location.- Parameters:
- value- The new value for this property.
- Returns:
- This object.
 
- 
getDescriptionReturns the description.- Returns:
- The description.
 
- 
setDescriptionSets the description.- Parameters:
- value- The new value for this property.
- Returns:
- This object.
 
- 
getStyleReturns the style.- Returns:
- The style.
 
- 
setStyleSets the style.- Parameters:
- value- The new value for this property.
- Returns:
- This object.
 
- 
getRequiredReturns the required flag.- Returns:
- The required flag.
 
- 
setRequiredSets the required flag.- Parameters:
- value- The new value for this property.
- Returns:
- This object.
 
- 
getDeprecatedReturns the deprecated flag.- Returns:
- The deprecated flag.
 
- 
setDeprecatedSets the deprecated flag.- Parameters:
- value- The new value for this property.
- Returns:
- This object.
 
- 
getAllowEmptyValueReturns the allow empty value flag.- Returns:
- The allow empty value flag.
 
- 
setAllowEmptyValueSets the allow empty value flag.- Parameters:
- value- The new value for this property.
- Returns:
- This object.
 
- 
getExplodeReturns the explode flag.- Returns:
- The explode flag.
 
- 
setExplodeSets the explode flag.- Parameters:
- value- The new value for this property.
- Returns:
- This object.
 
- 
getAllowReservedReturns the allow reserved flag.- Returns:
- The allow reserved flag.
 
- 
setAllowReservedSets the allow reserved flag.- Parameters:
- value- The new value for this property.
- Returns:
- This object.
 
- 
getSchemaReturns the schema.- Returns:
- The schema.
 
- 
setSchemaSets the schema.- Parameters:
- value- The new value for this property.
- Returns:
- This object.
 
- 
getExampleReturns the example.- Returns:
- The example.
 
- 
setExampleSets the example.- Parameters:
- value- The new value for this property.
- Returns:
- This object.
 
- 
getExamplesReturns the examples map.- Returns:
- The examples map.
 
- 
setExamplesSets the examples map.- Parameters:
- value- The new value for this property.
- Returns:
- This object.
 
- 
getDescription copied from class:OpenApiElementGeneric property getter.Can be used to retrieve non-standard Swagger fields such as "$ref" .- Overrides:
- getin class- OpenApiElement
- Type Parameters:
- T- The datatype to cast the value to.
- Parameters:
- property- The property name to retrieve.
- type- The datatype to cast the value to.
- Returns:
- The property value, or null if the property does not exist or is not set.
 
- 
setDescription copied from class:OpenApiElementGeneric property setter.Can be used to set non-standard Swagger fields such as "$ref" .- Overrides:
- setin class- OpenApiElement
- Parameters:
- property- The property name to set. Must not be- null .
- value- The new value for the property.
- Returns:
- This object
 
- 
keySetDescription copied from class:OpenApiElementReturns all the keys on this element.- Overrides:
- keySetin class- OpenApiElement
- Returns:
- All the keys on this element.
   
 Nevernull .
 
- 
strictDescription copied from class:OpenApiElementSets strict mode on this bean.- Overrides:
- strictin class- OpenApiElement
- Returns:
- This object
 
- 
strictDescription copied from class:OpenApiElementSets strict mode on this bean.- Overrides:
- strictin class- OpenApiElement
- Parameters:
- value- The new value for this property.
 Non-boolean values will be converted to boolean using- Boolean..- valueOf (value.toString())
 Can be- null (interpreted as- false ).
- Returns:
- This object
 
 
-