Package org.apache.tapestry5.annotations
Annotation Type RestInfo
-
@Target({METHOD,TYPE}) @Retention(RUNTIME) @Documented @UseWith(PAGE) public @interface RestInfo
Annotation that provides some information about REST event handler methods for OpenAPI description generation. It can be used in methods and also in pages to define defaults used by all methods without the annotation, except for {returnType()
.- See Also:
OpenApiDescriptionGenerator
,OpenApiTypeDescriber
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description java.lang.String[]
consumes
Defines the request body media types supported by the annotated REST event handler method.java.lang.String[]
produces
Defines the media types of the responses provided by the annotated REST event handler method in successful requests.java.lang.Class<?>
returnType
Defines the return type of this REST event handler method in successful requests.
-
-
-
Element Detail
-
consumes
java.lang.String[] consumes
Defines the request body media types supported by the annotated REST event handler method.- Default:
- {""}
-
-
-
produces
java.lang.String[] produces
Defines the media types of the responses provided by the annotated REST event handler method in successful requests.- Default:
- {""}
-
-
-
returnType
java.lang.Class<?> returnType
Defines the return type of this REST event handler method in successful requests. This is particularly useful for methods that have Object return type because they may return non-response objects for error reasons, such asHttpError
.- Default:
- java.lang.Object.class
-
-