Annotation Interface StatusCode
Annotation used to denote an HTTP response status code.
Can be used in the following locations:
- Arguments of server-side @RestOp -annotated methods.
- Methods and return types of server-side and client-side @Response -annotated interfaces.
Arguments of server-side @RestOp -annotated methods
 On server-side REST, this annotation can be applied to method parameters to identify them as an HTTP response value.
Example:
   
 The parameter type must be Value with a parameterized type of Integer.
 
Public methods of @Response -annotated types
 
 On @Response-annotated classes, this method can be used to denote an HTTP status code on a response.
 
Example:
   
   
The method being annotated must be public and return a numeric value.
See Also:
Methods and return types of server-side and client-side @Response-annotated interfaces
See Also:
See Also:
- 
Optional Element SummaryOptional Elements
- 
Element Details- 
descriptionOptional description for the exposed API.- Returns:
- The annotation value.
- Since:
- 9.2.0
 - Default:
- {}
 
- 
onDynamically apply this annotation to the specified classes.See Also:- Returns:
- The annotation value.
 - Default:
- {}
 
- 
onClassDynamically apply this annotation to the specified classes.Identical to on()except allows you to specify class objects instead of a strings.See Also:- Returns:
- The annotation value.
 - Default:
- {}
 
- 
valueint[] valueThe HTTP response codes. The default value is500 for exceptions and200 for return types.- Returns:
- The annotation value.
 - Default:
- {}
 
 
-