Skip to main content

extract_scope

Function extract_scope 

Source
pub fn extract_scope(
    env: &HashMap<String, String>,
    prefix: &str,
) -> CliResult<Value>
Expand description

Walk every env var starting with prefix, strip the prefix, lowercase the remainder into a field name, apply the _JSON precedence rule, and assemble a Value::Object. Returns the object verbatim — no shape validation; the connector’s own Deserialize impl is the gate.

The _JSON suffix is the escape hatch for nested / tagged-enum fields (auth, pagination, etc.) that don’t flatten cleanly into env-var names.