Skip to main content

derived_view

Function derived_view 

Source
pub(crate) fn derived_view(
    api: &str,
    auth: AuthOptions<'_>,
    derive: impl Fn(&Value) -> Value,
) -> String
Expand description

Fetches /api/view and applies a pure derivation to it, pretty-printed.

A non-2xx or non-JSON response is fatal before the derivation runs: classifying an error body would produce a confidently empty document, which reads as “nothing to do” — the worst possible failure mode for a next-actions surface.