Package org.apache.tapestry5.annotations
Annotation Type 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()
.-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionString[]
Defines the request body media types supported by the annotated REST event handler method.String[]
Defines the media types of the responses provided by the annotated REST event handler method in successful requests.Class<?>
Defines the return type of this REST event handler method in successful requests.
-
Element Details
-
consumes
Defines the request body media types supported by the annotated REST event handler method.- Default:
- {""}
-
produces
Defines the media types of the responses provided by the annotated REST event handler method in successful requests.- Default:
- {""}
-
returnType
Class<?> returnTypeDefines 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
-