@schmock/core
v2.4.0
Published
Core functionality for Schmock
Downloads
598
Readme
@schmock/core
Core mock builder, routing, and plugin pipeline for Schmock.
Part of Schmock — mock APIs from OpenAPI specs or hand-crafted routes.
Install
bun add -d @schmock/coreUsage
import { schmock } from "@schmock/core";
const mock = schmock();
mock("GET /users", [{ id: 1, name: "Alice" }]);
mock("POST /users", ({ body }) => [201, body]);
const response = await mock.handle("GET", "/users");
// → { status: 200, body: [{ id: 1, name: "Alice" }] }Documentation
License
MIT © Khalic Lab
