@Target(value={METHOD,TYPE,ANNOTATION_TYPE}) @Retention(value=RUNTIME) @Inherited @Repeatable(value=ApiResponses.class) public @interface ApiResponse
Operation
to define one or more responses of the
Operation.
swagger-jaxrs2 reader engine considers this annotation along with method return type and context as input to resolve the OpenAPI Operation responses.
Operation
Modifier and Type | Optional Element and Description |
---|---|
Content[] |
content
An array containing descriptions of potential response payloads, for different media types.
|
String |
description
A short description of the response.
|
Extension[] |
extensions
The list of optional extensions
|
Header[] |
headers
An array of response headers.
|
Link[] |
links
An array of operation links that can be followed from the response.
|
String |
ref
A reference to a response defined in components responses.
|
String |
responseCode
The HTTP response code, or 'default', for the supplied response.
|
public abstract String description
public abstract String responseCode
public abstract Header[] headers
public abstract Link[] links
public abstract Content[] content
public abstract Extension[] extensions
public abstract String ref
Copyright © 2018. All rights reserved.