Skip to main content

extract_asyncapi

Function extract_asyncapi 

Source
pub fn extract_asyncapi(
    source_path: &str,
    input: &str,
) -> Result<EventDocument, EventExtractionError>
Expand description

Extracts static event facts from an AsyncAPI 2.x or 3.x YAML/JSON document.

The extractor resolves only local component references. Templated channel addresses, server namespaces, unresolved references, and conflicting server protocols remain explicit warnings. Message payloads are reduced to bounded schema metadata and are never retained as source.

ยงErrors

Returns EventExtractionError for oversized or malformed input, a non-object root, an unsupported AsyncAPI version, or object collections with invalid shapes.