@suluk/scalar - v0.8.0
    Preparing search index...

    Function enrichedSpec

    • Project a v4 document to the 3.1 spec Scalar consumes, ENRICHED with the v4 facets (cost/access → badges + detail

      • intro). The standalone (+ the /reference composite's view-as endpoint) both serve this. Never mutates doc.

      Parameters

      • doc: OpenAPIv4Document
      • opts: { facetBadges?: boolean } = {}

      Returns { spec: Record<string, unknown>; diagnostics: Diagnostic[] }