Skip to main content

@RestOp-Annotated Method Basics

REST Java methods are identified on REST servlets using the @RestOp annotation.

The annotation allows the framework to identify the available REST methods through reflection.

RestOpclientVersion consumes converters debug defaultAccept defaultCharset defaultContentType defaultRequestAttributes defaultRequestFormData defaultRequestHeaders defaultRequestQueryData defaultResponseHeaders description encoders guards matchers maxInput method on parsers path produces roleGuard rolesDeclared serializers summary swagger value
Example
@RestOp(method=GET, path="/")
public String sayHello() {
return "Hello world!";
}

The following specialized annotations are also provided for specific HTTP methods:

RestGet RestPut RestPost RestPatch RestDelete RestOptions
Example
@RestGet(path="/")
public String sayHello() {
return "Hello world!";
}