qmetrics.net

Ajv

JSON Schema and JSON Type Definition validator for JavaScript

Ajv screenshot

Ajv compiles JSON Schemas into validation functions for Node.js and browsers. It supports multiple JSON Schema drafts and JSON Type Definition (RFC 8927).

Overview

Ajv is a validator that turns JSON Schema and JSON Type Definition documents into functions that check JSON data. It targets Node.js and browser environments, including Electron and similar JavaScript runtimes.

The library covers standard validation keywords, remote schema references, recursive references, nullable and discriminator keywords, and JTD schema forms including union and user-defined keywords. It can report all errors at once, coerce types, assign defaults, remove additional properties, and support custom formats and keywords, including asynchronous validation.

Schemas compile to optimized JavaScript for runtime checks. A command-line interface is available, and documentation covers strict mode, standalone validation code generation, and security considerations.

Ajv is used widely in JavaScript applications and tools for configuration and data validation.

Key features

  • JSON Schema drafts 04 through 2020-12
  • JSON Type Definition (RFC 8927)
  • Remote and recursive schema references
  • Custom and user-defined keywords
  • $data references from validated data
  • All-errors validation mode
  • Type coercion and default assignment
  • Command-line interface

Use cases

  • Validating API request and response bodies
  • Checking configuration files
  • Enforcing data shapes in Node.js services
  • Client-side form and payload validation

Tags

Similar software

ShellCheck

Static analysis and linting for Bash shell scripts

ShellCheck scans bash and POSIX shell scripts for syntax, semantic, and portability problems. It is available as a CLI tool, editor integration, web paste interface, and CI hook.

★ 40.4k⟳ todayGPL-3.0

Mypy

Optional static type checker for Python

Mypy checks Python programs against PEP 484 type hints before you run them. It supports gradual typing so you can add annotations over time.

★ 20.7k⟳ todayMIT · open core

typescript-eslint

ESLint tooling for linting TypeScript codebases

typescript-eslint connects ESLint to TypeScript syntax and ships parser services plus lint rules. It enables standard and type-aware linting for JavaScript and TypeScript projects.

★ 16.5k⟳ 2 days agoMIT

React Doctor

CLI static analysis for React code quality

React Doctor scans React projects for correctness, performance, security, accessibility, and maintainability issues. Run it locally, in CI, or as an agent skill.

★ 15.2k⟳ 11 days agoMIT

Why Did You Render

React and React Native avoidable re-render diagnostics

Welldone Software’s library monkey-patches React in development to log when components render and why. It highlights redundant updates and works with React Native.

★ 12.5k⟳ 1 year agoMIT

SonarQube

Open-source code quality and security verification platform

SonarQube inspects code with static analysis for bugs, vulnerabilities, and maintainability issues. The Community Build is the free edition you can run yourself.

★ 11.2k⟳ yesterdayLGPL-3.0