qmetrics.net

jsonschema

Fast JSON Schema validator for JavaScript

jsonschema validates JavaScript values against JSON Schema documents through draft-07. It returns structured errors, supports custom formats, and offers many validation options.

Overview

jsonschema is a JavaScript JSON Schema validator focused on speed and a small API surface. It fully supports schema versions through draft-07 and can validate plain objects, arrays, and nested structures against schemas you provide at runtime.

Validation returns a result object with validity, the instance, the schema used, and an array of errors listing paths, messages, failed keywords, and arguments. Options let you throw on first or all errors, treat undefined properties as invalid when required, disable format checking, or surface nested errors from oneOf and anyOf branches for easier debugging.

The validator implements standard keywords and types, custom attribute hooks, user-defined formats on instances or prototypes, schema dereferencing for remote definitions, rewrite hooks to coerce instances after successful validation, pre-property hooks, skipping or forbidding unknown keywords, and configurable base URIs for relative schema IDs.

Install paths documented include npm, yarn, and bun. The test suite draws on the shared JSON Schema test suite plus project-specific cases. Phone number formats follow the E.123 standard when format validation is enabled.

Key features

  • JSON Schema draft-07 support
  • Structured ValidatorResult errors
  • Custom format validators
  • Custom schema keyword attributes
  • Remote schema dereferencing
  • Optional throw on validation failure
  • Instance rewrite after validation
  • Configurable format validation disable

Use cases

  • Request body validation in Node apps
  • Config file sanity checks
  • API contract testing in JavaScript
  • Form payload validation on servers
  • Extending schemas with custom keywords

Tags

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