UNPKG

counterfact

Version:

Generate a TypeScript-based mock server from an OpenAPI spec in seconds — with stateful routes, hot reload, and REPL support.

7 lines (6 loc) 234 B
import { OpenApiDocument } from "./openapi-document.js"; export async function loadOpenApiDocument(source, overlays = []) { const document = new OpenApiDocument(source, overlays); await document.load(); return document; }