Skip to main content

parse_inline_catalog

Function parse_inline_catalog 

Source
pub fn parse_inline_catalog(json: &Value) -> Result<InlineCatalog>
Expand description

Parse an inline catalog from a raw JSON value.

Extracts:

  • catalogId (required, must be a non-empty string),
  • the keys of the components map (validated component names),
  • for each entry in the functions map: its name, returnType (required), and the keys of args.properties (argument names).

Every component and function name is validated against ^[A-Za-z_][A-Za-z0-9_]*$ and duplicate names within their respective maps are rejected.