@CompileStatic class ResponseMetaData extends Object
Defines the basic structure of response metadata.
It can be extended by input channel/interface with more data specific to the concrete channel. For example, take a look atHttpResponseMetaData
.
All of the data presented here will probably be serialized to the end-user in the appropriate form. For example, when rendered as JSON, metadata can look something like the following example:
{ "metaData": { "general": { "severity": "info", "locale": "en_GB", "timestamp": "2020-04-30T15:37:24.999722Z" } }, "payload": { ... } }
Type | Name and description |
---|---|
ResponseMetaDataGeneralPart |
general Sub-structure containing general parts of the response. |
ResponseMetaDataViolationPart |
violation Sub-structure that describes current violation when the processing of the request ends up in some error. |
Constructor and description |
---|
ResponseMetaData() |
Type Params | Return Type | Name and description |
---|---|---|
|
static ResponseMetaData |
makeBasicInfoResponseMetaData() Creates basic ResponseMetaData that contains only a general part with the timestamp and INFO severity. |
Sub-structure containing general parts of the response.
Present and rendered for all kind of responses, successful and erroneous.Sub-structure that describes current violation when the processing of the request ends up in some error.
For successful responses, the violation part should not be rendered. Creates basic ResponseMetaData that contains only a general part with the timestamp and INFO
severity.
Groovy Documentation