@Target(value=METHOD) @Retention(value=RUNTIME) public @interface ApiResponse
ApiOperation
.
If your API has uses a different response class for these responses, you can describe them
here by associating a response class with a response code.
Note, Swagger does not allow multiple response types for a single response code.
This annotation is not used directly and will not be parsed by Swagger. It should be used
within the ApiResponses
.ApiOperation
,
ApiResponses
Modifier and Type | Required Element and Description |
---|---|
int |
code
The HTTP status code of the response.
|
String |
message
Human-readable message to accompany the response.
|
Modifier and Type | Optional Element and Description |
---|---|
String |
reference
Specifies a reference to the response type.
|
Class<?> |
response
Optional response class to describe the payload of the message.
|
String |
responseContainer
Declares a container wrapping the response.
|
ResponseHeader[] |
responseHeaders
A list of possible headers provided alongside the response.
|
public abstract int code
public abstract String message
public abstract Class<?> response
public abstract String reference
public abstract ResponseHeader[] responseHeaders
public abstract String responseContainer
Copyright © 2015. All Rights Reserved.