@Retention(value=RUNTIME) public @interface RamlBody
This annotation is used to help describe a RAML body type for both requests and responses.
RamlResponse,
RamlRequests| Modifier and Type | Required Element and Description |
|---|---|
String |
contentType
The content type of the body(eg.
|
public abstract String contentType
The content type of the body(eg. “application/json”)
public abstract Class<?> type
A reference to the object type used for this body.
If this is supplied, the generator will attempt to use an appropriate generator to generate a schema document for the object.
If the object has a @RamlExample annotated static method that returns a concrete example of the type, the generator will use that to create an example payload.
If not value is provided here, the generator will resort to the contents of the schema() and example() properties to derive body schema and example
public abstract String schema
The schema for this body type. The value in here can make reference to a classpath resource or a direct text entry.
This will be used to supply a schema in the RAML specification if the type() property has not be defined.
public abstract String example
The example for this body type. The value in here can make reference to a classpath resource or a direct text entry.
This will be used to supply a schema in the RAML specification if the type() property has not been defined.
Copyright © 2018. All rights reserved.