qmetrics.net

JSON Schema Faker

JSON Schema-driven fake data generator library

JSON Schema Faker screenshot

json-schema-faker produces valid sample JSON from JSON Schema definitions with zero production dependencies. It offers async and sync APIs, a CLI, and optional faker or chance extensions.

Overview

JSON Schema Faker generates instance data that satisfies a given JSON Schema document. The implementation is written in TypeScript for Bun and Node-like runtimes and advertises no required production dependencies beyond optional integrations you opt into.

It supports JSON Schema drafts 2019-09 and 2020-12, including composition keywords, conditional properties, $ref resolution with cycle handling, remote references via a resolver helper, built-in string formats, regex patterns through an AST-based generator, and custom formats or keywords registered at runtime. Seeded randomness enables deterministic output for tests.

Programmatic entry points include generate, reusable generators, synchronous variants for in-memory schemas, helpers that emit JSON or YAML strings, and hooks to transform output. Optional extensions connect faker.js or chance.js for richer strings, and a yaml extension for YAML serialization.

A global jsf CLI reads schema files or stdin, writes to stdout or files, and exposes flags for counts, seeds, depth limits, and optional property filling. Standalone binaries are published per platform for Linux, macOS, and Windows architectures.

Key features

  • JSON Schema 2019-09 and 2020-12 support
  • Seeded deterministic generation
  • $ref and remote schema resolution
  • Custom formats and keyword extensions
  • Sync and async generate APIs
  • JSON and YAML output helpers
  • Optional faker and chance extensions
  • jsf command-line tool

Use cases

  • Mock API payloads from schemas
  • Fixture data for automated tests
  • Prototyping forms and UIs
  • CLI batch sample generation
  • Contract testing with repeatable seeds

Similar software

Keploy

Record-and-replay API and integration testing from traffic

Keploy captures API calls, database queries, and streaming events, then replays them as tests and dependency mocks without changing application code.

★ 20k⟳ todayApache-2.0

GoReplay

Capture and replay live HTTP traffic

GoReplay records HTTP from network interfaces and replays it to test servers for shadowing, load testing, and debugging. It runs as a command-line daemon without in-path proxy changes.

★ 19.3k⟳ 1 year agoGPL-3.0 · open core
API Development & TestingNo commits in 18+ monthsDesktop/CLI app

MSW

JavaScript API mocking through network-level request interception

Mock Service Worker lets you define HTTP mocks once and reuse them in browsers and Node.js. Applications keep calling real APIs while responses are substituted at the network layer.

★ 18.4k⟳ 2 days agoMIT

supertest

Node.js HTTP server testing via superagent

Supertest offers a fluent API for asserting HTTP behavior against Node.js servers during automated tests. It builds on superagent so you can express status, headers, and body expectations in code.

★ 14.4k⟳ 21 days agoMIT

MeterSphere

Open continuous testing platform with built-in AI assistant

MeterSphere is an open continuous testing tool with AI-assisted case generation, test management, and API testing for teams. It uses a system-organization-project hierarchy for collaboration.

★ 13.7k⟳ 1 month agoGPL-3.0

Karate

Unified open-source test automation framework

Karate combines API testing, mocks, performance testing, and UI automation in one framework with a readable syntax. Tests run via JUnit, a CLI, or CI/CD with parallel execution.

★ 9k⟳ 2 days agoMIT