{title:'@RestOp-Annotated Methods', updated:'9.0.0'}

REST Java methods are identified on REST servlets using the {@link oajr.annotation.RestOp @RestOp} annotation. The annotation allows the framework to identify the available REST methods through reflection.

- {@link oajr.annotation.RestOp}
  - {@link oajr.annotation.RestOp#clientVersion() clientVersion}
  - {@link oajr.annotation.RestOp#consumes() consumes}
  - {@link oajr.annotation.RestOp#contextClass() contextClass}
  - {@link oajr.annotation.RestOp#converters() converters}
  - {@link oajr.annotation.RestOp#debug() debug}
  - {@link oajr.annotation.RestOp#defaultAccept() defaultAccept}
  - {@link oajr.annotation.RestOp#defaultCharset() defaultCharset}
  - {@link oajr.annotation.RestOp#defaultContentType() defaultContentType}
  - {@link oajr.annotation.RestOp#defaultRequestAttributes() defaultRequestAttributes}
  - {@link oajr.annotation.RestOp#defaultRequestFormData() defaultRequestFormData}
  - {@link oajr.annotation.RestOp#defaultRequestHeaders() defaultRequestHeaders}
  - {@link oajr.annotation.RestOp#defaultRequestQueryData() defaultRequestQueryData}
  - {@link oajr.annotation.RestOp#defaultResponseHeaders() defaultResponseHeaders}
  - {@link oajr.annotation.RestOp#description() description}
  - {@link oajr.annotation.RestOp#encoders() encoders}
  - {@link oajr.annotation.RestOp#guards() guards}
  - {@link oajr.annotation.RestOp#matchers() matchers}
  - {@link oajr.annotation.RestOp#maxInput() maxInput}
  - {@link oajr.annotation.RestOp#method() method}
  - {@link oajr.annotation.RestOp#on() on}
  - {@link oajr.annotation.RestOp#parsers() parsers}
  - {@link oajr.annotation.RestOp#path() path}
  - {@link oajr.annotation.RestOp#produces() produces}
  - {@link oajr.annotation.RestOp#roleGuard() roleGuard}
  - {@link oajr.annotation.RestOp#rolesDeclared() rolesDeclared}
  - {@link oajr.annotation.RestOp#serializers() serializers}
  - {@link oajr.annotation.RestOp#summary() summary}
  - {@link oajr.annotation.RestOp#swagger() swagger}
  - {@link oajr.annotation.RestOp#value() value}

##### Example:

| @RestOp(method=GET, path="/") | public String sayHello() { | return "Hello world!"; | }

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

- {@link oajr.annotation.RestGet}
- {@link oajr.annotation.RestPut}
- {@link oajr.annotation.RestPost}
- {@link oajr.annotation.RestDelete}

##### Example:

| @RestGet(path="/") | public String sayHello() { | return "Hello world!"; | }