@Target(value={PARAMETER,METHOD,FIELD}) @Retention(value=RUNTIME) @Repeatable(value=Parameters.class) @Inherited public @interface Parameter
Modifier and Type | Optional Element and Description |
---|---|
boolean |
allowEmptyValue
When true, allows sending an empty value.
|
boolean |
allowReserved
Determines whether the parameter value SHOULD allow reserved characters, as defined by RFC3986.
|
Content[] |
content
The representation of this parameter, for different media types.
|
boolean |
deprecated
Specifies that a parameter is deprecated and SHOULD be transitioned out of usage.
|
java.lang.String |
description
A brief description of the parameter.
|
java.lang.String |
example
Provides an example of the schema.
|
ExampleObject[] |
examples
Provides an array examples of the schema.
|
Explode |
explode
When this is true, parameter values of type array or object generate separate parameters for each value of the
array or key-value pair of the map.
|
boolean |
hidden
Allows this parameter to be marked as hidden
|
ParameterIn |
in
The location of the parameter.
|
java.lang.String |
name
The name of the parameter.
|
java.lang.String |
ref
Reference value to a Parameter object.
|
boolean |
required
Determines whether this parameter is mandatory.
|
Schema |
schema
The schema defining the type used for the parameter.
|
ParameterStyle |
style
Describes how the parameter value will be serialized depending on the type of the parameter value.
|
public abstract java.lang.String name
When the parameter is defined within Components
, the name
will be used as the key to add this parameter to the 'parameters' map for reuse.
If in is "path", the name field MUST correspond to the associated path segment from the path field in the Paths Object. See Path Templating for further information.
If in is "header" and the name field is "Accept", "Content-Type" or "Authorization", the parameter definition SHALL be ignored.For all other cases, the name corresponds to the parameter name used by the in property.
public abstract ParameterIn in
Possible values are specified in ParameterIn enum. Ignored when empty string.
public abstract java.lang.String description
public abstract boolean required
If the parameter location is "path", this property is REQUIRED and its value MUST be true. Otherwise, the property may be included and its default value is false.
public abstract boolean deprecated
public abstract boolean allowEmptyValue
This may create validation errors when the parameter is required. Valid only for query parameters and allows sending a parameter with an empty value.
If style is used, and if behavior is n/a (cannot be serialized), the value of allowEmptyValue SHALL be ignored.public abstract ParameterStyle style
Default values (based on value of in): for query - form; for path - simple; for header - simple; for cookie - form.
Ignored if the properties content or array are specified.public abstract Explode explode
For other types of parameters this property has no effect. When style is form, the default value is true. For all other styles, the default value is false.
Ignored if the properties content or array are specified.public abstract boolean allowReserved
This property only applies to parameters with an in value of query. Ignored if the properties content or array are specified.
public abstract Schema schema
public abstract Content[] content
public abstract boolean hidden
public abstract ExampleObject[] examples
When associated with a specific media type, the example string shall be parsed by the consumer to be treated as an object or an array.
Ignored if the properties content or array are specified.public abstract java.lang.String example
When associated with a specific media type, the example string SHALL be parsed by the consumer to be treated as an object or an array.
Ignored if the properties examples, content or array are specified.public abstract java.lang.String ref
This property provides a reference to an object defined elsewhere. This property and all other properties are mutually exclusive. If other properties are defined in addition to the ref property then the result is undefined.