zcap-spec-examples - v0.2.0
    Preparing search index...

    Interface ZcapSpecExample

    A single example extracted from a spec document.

    This is what extractExamples returns, and exactly what the CLI prints as one line of NDJSON.

    interface ZcapSpecExample {
        name: string;
        content: string;
        url: string;
        mediaType: string;
    }
    Index
    name: string

    Stable name for this example -- the element's id when it has one, else example-<n>.

    content: string

    The example's source text (e.g. a JSON or HTTP snippet), trimmed.

    url: string

    Link to this example in its source document. Absolute whenever a base URL can be determined -- from --base-url, from a URL the document declares about itself (ReSpec's edDraftURI, <base href>, <link rel=canonical>, og:url), or from the URL that was fetched. Falls back to a bare fragment (#example-1) when none of those are available.

    mediaType: string

    Best-effort media type of content, e.g. "application/json".