@Target(value={PARAMETER,METHOD,FIELD,ANNOTATION_TYPE}) @Retention(value=RUNTIME) @Repeatable(value=Parameters.class) @Inherited public @interface Parameter
Operation.parameters()
or at
method level to add a parameter to the operation, even if not bound to any method parameter.
swagger-jaxrs2 reader engine considers this annotation along with JAX-RS annotations, parameter type and context as input to resolve a method parameter into an OpenAPI Operation parameter.
For method parameters bound to the request body, see RequestBody
RequestBody
,
Operation
,
Schema
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.
|
ArraySchema |
array
The schema of the array that defines this parameter.
|
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.
|
String |
description
Additional description data to provide on the purpose of the parameter
|
String |
example
Provides an example of the schema.
|
ExampleObject[] |
examples
An array of examples of the schema used to show the use of the associated 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.
|
Extension[] |
extensions
The list of optional extensions
|
boolean |
hidden
Allows this parameter to be marked as hidden
|
ParameterIn |
in
The location of the parameter.
|
String |
name
The name of the parameter.
|
String |
ref
A reference to a parameter defined in components parameter.
|
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 String name
public abstract ParameterIn in
public abstract String description
public abstract boolean required
public abstract boolean deprecated
public abstract boolean allowEmptyValue
public abstract ParameterStyle style
public abstract Explode explode
public abstract boolean allowReserved
public abstract Schema schema
public abstract ArraySchema array
public abstract Content[] content
public abstract boolean hidden
public abstract ExampleObject[] examples
public abstract String example
public abstract Extension[] extensions
public abstract String ref
Copyright © 2018. All rights reserved.