@Target(value=METHOD) @Retention(value=RUNTIME) public @interface ApiImplicitParam
While ApiParam
is bound to a JAX-RS parameter,
method or field, this allows you to manually define a parameter in a fine-tuned manner.
This is the only way to define parameters when using Servlets or other non-JAX-RS
environments.
This annotation must be used as a value of ApiImplicitParams
in order to be parsed.
ApiImplicitParams
Modifier and Type | Optional Element and Description |
---|---|
String |
access
Allows for filtering a parameter from the API documentation.
|
String |
allowableValues
Limits the acceptable values for this parameter.
|
boolean |
allowMultiple
Specifies whether the parameter can accept multiple values by having multiple occurrences.
|
String |
dataType
The data type of the parameter.
|
String |
defaultValue
Describes the default value for the parameter.
|
String |
name
Name of the parameter.
|
String |
paramType
The parameter type of the parameter.
|
boolean |
required
Specifies if the parameter is required or not.
|
String |
value
A brief description of the parameter.
|
public abstract String name
For proper Swagger functionality, follow these rules when naming your parameters based on paramType()
:
paramType
is "path", the name should be the associated section in the path.paramType()
public abstract String value
public abstract String defaultValue
public abstract String allowableValues
There are three ways to describe the allowable values:
first, second, third
.range[1, 5]
, range(1, 5)
, range[1, 5)
.range[1, infinity]
means the
minimum allowable value of this parameter is 1.public abstract boolean required
Path parameters should always be set as required.
public abstract String access
See io.swagger.core.filter.SwaggerSpecFilter for further details.
public abstract boolean allowMultiple
public abstract String dataType
This can be the class name or a primitive.
public abstract String paramType
path
, query
, body
, header
or form
.Copyright © 2015. All Rights Reserved.