How to return a Static JSON Document

Using the template element, we can easily define static content with specified content type and dynamic generation using groovy.

Configuration

<api port="2000">
<response>
<template contentType="application/json">
{
"city": "bonn",
"country": "germany"
}
</template>
</response>
<return />
</api>
<api port="2000">
    <response>
      <template contentType="application/json">
        {
          "city": "bonn",
          "country": "germany"
        }
      </template>
    </response>
    <return />
  </api>

Resources

ElementDocumentationExamples
TemplateDocumentationExamples