chain

Version

A Chain groups multiple interceptors into reusable components, reducing redundancy in API configurations.

Example Configuration

components:
my-chain:
chain:
- log:
message: chain is invoked
- jsonProtection:
maxDepth: 10
---
api:
port: 2000
flow:
- $ref: "#/components/my-chain"
- return:
status: 200
components:
    my-chain:
      chain:
        - log:
           message: chain is invoked
        - jsonProtection:
           maxDepth: 10
  ---
  api:
   port: 2000
   flow:
     - $ref: "#/components/my-chain"
     - return:
         status: 200

Syntax

chain:
- <flow>
chain:
  - <flow>

Child Structure

ElementCardinalityDescription
flow0..*Sets the flow of plugins that will be executed.

Can be used in