Package io.muserver.rest
Annotation Type ApiResponse
-
@Target({METHOD,TYPE}) @Retention(RUNTIME) @Repeatable(ApiResponses.class) public @interface ApiResponse
Describes a response code and description for an API method, for documentation purposes.
Multiple annotations can be added to cover multiple response types.
- See Also:
ApiResponses
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description java.lang.String[]
contentType
The content type for this code, if different from the defaultjava.lang.String
example
An example return valuejava.lang.Class<?>
response
The type of the response body.ResponseHeader[]
responseHeaders
A list of possible headers provided alongside the response.
-
-
-
-
message
java.lang.String message
A short description of the response. CommonMark syntax MAY be used for rich text representation.- Returns:
- The description
-
-
-
responseHeaders
ResponseHeader[] responseHeaders
A list of possible headers provided alongside the response.- Returns:
- a list of response headers.
- Default:
- {}
-
-