Expand description
YAML loading and shell-style ${ENV_VAR:-default} interpolation.
Two loading modes: load_yaml_with_env interpolates the raw file text
before parsing (used for system.yaml, which is never served back to
clients), while load_yaml preserves placeholders verbatim (used for
gateway.yaml, whose contents the Admin API serves to the Web UI โ
resolved secrets must never appear there). Placeholders in gateway config
are resolved at the point of consumption instead: plugin node config at
graph-compile time via interpolate_env_json, route match rules and
consumer credentials when the route table / consumer store are built.
Functionsยง
- coerce_
scalar ๐ - Types a resolved full-placeholder value the way YAML types the same
unquoted scalar: booleans and finite numbers; everything else
None. - interpolate_
env - Replaces
${VAR}and${VAR:-default}patterns with environment variable values. - interpolate_
env_ json - Recursively interpolates
${ENV_VAR:-default}patterns in every string leaf of a JSON value โ object values, array elements, and nested combinations โ leaving numbers, booleans, and null untouched. - interpolated_
replacement ๐ - The replacement for a string leaf containing
${...},Nonefor everything else (the${fast-path guard included). - load_
yaml - Loads a YAML file and deserializes into
Twithout resolving${ENV_VAR}placeholders โ they are preserved verbatim in the parsed structure. - load_
yaml_ with_ env - Loads a YAML file, interpolates environment variables, and deserializes into
T.