Annotation Type RestObjectProperty
@Documented
@Target(METHOD)
@Retention(SOURCE)
public @interface RestObjectProperty
Used to document request or response body properties, i.e. top-level properties of a JSON accepted
or returned as request or response. Not to be confused with
RestParam
for query/form/path params.
Cannot be used alone. It should be used as part of RestRequest
annotation or RestResponse
annotation.-
Required Element Summary
Required Elements Modifier and Type Required Element Description java.lang.String
name
Name of the property. -
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description java.lang.String
description
Description of the property.boolean
required
Specifies if the property is required or optional in the request body when used withRestRequest
.java.lang.String
sampleValue
Sample Value of the property.
-
Element Details
-
name
java.lang.String nameName of the property.
Required.
-
-
-
description
java.lang.String descriptionDescription of the property.
Optional.
Default Value - "No description available."- Default:
- "No description available"
-
required
boolean requiredSpecifies if the property is required or optional in the request body when used withRestRequest
.
Specifies if the property is included or not in the response body when used withRestResponse
.
Not enforced at runtime, informational only.
Optional.
Default Value - true.- Default:
- true
-
sampleValue
java.lang.String sampleValueSample Value of the property.
Optional.
Default Value - "No sample value available.:- Default:
- "No sample value available"
-