Package io.muserver.rest
Annotation Type ApiResponse
-
@Target({METHOD,TYPE}) @Retention(RUNTIME) @Repeatable(ApiResponses.class) public @interface ApiResponseDescribes 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[]contentTypeThe content type for this code, if different from the defaultjava.lang.StringexampleAn example return valuejava.lang.Class<?>responseThe type of the response body.ResponseHeader[]responseHeadersA 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:
- {}
-
-