response

Version

Configures JSON Schema validation for successful JSON-RPC responses of one method.

The schema is applied to the JSON-RPC result value. Use either location or an inline schema.

Syntax

response:
location: <string>
schema: {}
response:
  location: <string>
  schema: {}

Sample

<api port="2000" method="POST">
<response>
<static>POST is blocked!</static>
</response>
<return statusCode="405"/>
</api>
<api port="2000" method="POST">
    <response>
        <static>POST is blocked!</static>
    </response>
    <return statusCode="405"/>
</api>

Attributes

NameRequiredDefaultDescriptionExamples
locationfalse-

References the JSON Schema by path or URL.

Configure either location or schema, but not both.

classpath:/json/rpc/echo-params.schema.json

Child Structure

ElementCardinalityDescription
schema0..1Defines the JSON Schema inline.

Can be used in