Open Source API Gateway

case

Version

Syntax

case:
test: <string> # required
'$ref': <string>
flow:
- <flow>
language: groovy
xmlConfig: {}
case:
  test: <string> # required
  '$ref': <string>
  flow:
    - <flow>
  language: groovy
  xmlConfig: {}

Attributes

NameRequiredDefaultDescriptionExamples
$reffalse-Reference a component defined under components.-
languagefalsegroovythe language of the 'test' conditionSpEL, groovy, jsonpath, xpath
testtrue-the condition to be tested

XPath and JSONPath query the body. An empty body, or one of another media type, is evaluated as an empty document: /a is false and not(/a) is true. A body that should be XML or JSON but does not parse is rejected with 400 (request) or 502 (response).

In XPath, a comparison with a missing element is false for both = and !=. To reject anything but a given value, write not(/a = 'admin') rather than /a != 'admin'.

exc.request.header.userAgentSupportsSNI

Child Structure

ElementCardinalityDescription
flow0..*
xmlConfig0..1

Can be used in