Structures

A structure is a static JSON object whose values are applied to the response message at a given point. A profile defines one or more structures to apply. They are defined outside of the handlers section, allowing them to be reused by multiple Response Generator handlers.

The structure can consist of just a few fields to add or overwrite, or a more complicated object with nested objects.

Structure Configuration Properties describes the configuration properties that can be set for a structure:

Table 1. Structure Configuration Properties
Property Description
responseGenerator.structures.structureName An object merged into the response object at a defined position.

This is an example of a structure that merges a single field:

responseGenerator:
  structures:
    structureOne:
      fieldOne: "123"

This is a more complex example:

responseGenerator:
  structures:
    structureOne:
      fieldOne: "123"
      fieldTwo: "abc"
      fieldThree:
        subFieldOne: "xyz"
        subFieldTwo: "456"