Extracting Common Initialization Flow Tasks
…
x-flat-init: init.xml # ⬅ init flow
paths:
x-flat-flow: default.xml # ⬅ fallback flow
/:
get:
x-flat-flow: get.xml # ⬅ regular path flow
…<flow>
<template out="$cfg">
{
"stage": {{ $server/role ?? "prod" }},
"upstream_api": ${{ $env/API_ORIGIN ?? "localhost:3000" }}
}
</template>
<set-response-headers>
{
"Request-ID": {{ $request/id }}
}
</set-response-headers>
</flow>Last updated