Skip to content
CAI
Software that uses CAICheck a score

jonasschmidt/ex_json_schema

68.7

Adequate · 18 September 2026

2.3k

lines of production code

Elixir

primary language

1

measurement over time

CAI band scale
CAI lens gauges

What this system is

ExJsonSchema is an Elixir library that validates data against JSON Schema specifications, specifically supporting drafts 4, 6, and 7. It provides robust schema resolution with support for remote references and meta-schema validation, while returning detailed, structured error objects to pinpoint validation failures. The system includes built-in format validators and customizable error formatting to ensure compliance with standard test suites.

Features

Initial release of ExJsonSchema with multi-draft support and validation features

This entry introduces the ExJsonSchema library, a JSON Schema validator supporting draft 4, 6, and 7 specifications. Key capabilities include resolving schemas against their meta-schemas, handling remote schema references via configurable resolvers, and validating data against specific schema fragments. The library provides detailed validation error reporting through customizable formatters and supports custom format validators for string constraints. It also includes the official JSON Schema Test Suite as a submodule to ensure compliance.

(repo-wide) · high confidence

Behavioural changes

Comprehensive JSON Schema validation with structured error reporting

The validator module has been refactored to support a wide range of JSON Schema draft specifications (including Draft 4, 6, and 7) by extracting validation logic into dedicated modules for keywords such as \allOf\, \anyOf\, \oneOf\, \if/then/else\, \contains\, \const\, \dependencies\, \enum\, \not\, \propertyNames\, and \$ref\. Validation errors are now returned as structured data using specific error structs (e.g., \Error.AllOf\, \Error.Format\) rather than simple booleans, providing detailed context like invalid indices, missing properties, or expected values. The update also introduces built-in format validation for \date\, \date-time\, \email\, \hostname\, \ipv4\, \ipv6\, \uri\, and others, supports custom format validators, and improves numeric precision for \multipleOf\ using the \Decimal\ library.

_lib/ex\_json\schema/validator · high confidence

Migrate to Elixir 1.9+ config syntax and add test environment configuration

The application configuration has been updated to use the modern \import Config\ syntax instead of the deprecated \use Mix.Config\, and the \import\_config\ call now explicitly invokes \Mix.env()\ to load environment-specific files. Additionally, a new \config/test.exs\ file has been introduced to define test-specific settings for \ex\_json\_schema\, including a custom JSON decoder, a remote schema resolver using HTTPoison, and a custom format validator, alongside configuration for a sample Phoenix endpoint.

config · high confidence

Standardized JSON Schema validation error messages

The library now provides a dedicated error formatter module that generates human-readable, standardized messages for JSON Schema validation failures. This change introduces specific error descriptions for keywords such as \contentEncoding\, \contentMediaType\, \propertyNames\, and \const\, ensuring that users receive clear, contextual feedback (e.g., expected encoding or media type) rather than generic validation errors when data does not conform to the schema.

_lib/ex\_json\schema/validator/error · high confidence

Support for JSON Schema Drafts 4, 6, and 7 with improved reference handling

The library now includes bundled meta-schemas for JSON Schema Draft 4, Draft 6, and Draft 7, enabling validation against these specific specification versions. This change introduces a new \ExJsonSchema.Schema.Ref\ struct to represent references, allowing for more robust handling of location-independent identifiers and URI fragments. Additionally, a \ExJsonSchema.Schema.Root\ struct is introduced to manage schema state, including reference caching and custom format validators, replacing the previous internal representation.

_lib/ex\_json\schema/schema · high confidence

Validation errors now returned as structured objects with detailed paths

The library has shifted from returning simple boolean results to providing detailed, structured validation errors. The \ExJsonSchema.Validator\ now returns a list of \Error\ structs containing specific error types and absolute string paths (e.g., \\#\, \\#/properties/name\) instead of arrays or generic messages. This change enables applications to precisely identify which part of the data failed validation and allows for custom error formatting via the \error\_formatter\ option.

_lib/ex\_json\schema · high confidence

Test coverage

Added JSON Schema Test Suite coverage for Drafts 4, 6, and 7; Added test infrastructure for remote schema references; Added tests for schema resolution, validation, and error reporting.

Dependencies

Major dependency overhaul and project configuration update

The project has removed its core JSON parsing dependencies (Poison, exjsx, json) in favor of a zero-dependency approach for validation, while introducing new dependencies for development and testing including Decimal 3.0, Dialyxir, ExDoc, ExCoveralls, and a suite of test-only libraries (Jason, Plug.Cowboy, Phoenix, mix\_test\_watch). The Elixir requirement has been raised to version 1.6, and the project metadata has been updated with full Hex package details, documentation configuration, and dialyzer settings.

(dependencies) · high confidence

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Baseline

  • First survey — no prior run to compare against. CAI 69.

Lenses

  • Code Health 99
  • Architecture 99
  • Maturity 55
  • Readiness 64
  • Security 95

Changes since last survey

  • 232 commits — 197 feature/other, 35 fixes

By area

  • (root) — 102 commits
  • lib/ex_json_schema — 95 commits
  • (repo) — 16 commits
  • test/ex_json_schema — 8 commits
  • .github/workflows — 5 commits
  • test/JSON-Schema-Test-Suite — 3 commits
  • config/dev.exs — 1 commit
  • test/json_schema_test_suite_test.exs — 1 commit
  • test/support — 1 commit

Notable commits

  • fix: Add custom validator error field name, fix warnings, fix 1 failing test
  • fix: Add dialyzer and fix specs
  • fix: Cover and fix uncovered lines
  • fix: Fix GH Actions CI workflow
  • fix: Fix IRI regexes to maintain PCRE2 compatibility in OTP 28
  • fix: Fix Travis build matrix
  • fix: Fix badges
  • fix: Fix bug with resolving an absolute reference in a scoped schema
  • fix: Fix compilation warning in test controller
  • fix: Fix compiler warnings for Elixir 1.2
  • fix: Fix compiler warnings in Elixir 1.18
  • fix: Fix deprecation warning in mix.exs
  • fix: Fix deprecation warnings
  • fix: Fix dialyzer
  • fix: Fix dialyzer warnings
  • fix: Fix dialyzer; only support custom fmt validator as root option
  • fix: Fix exclusiveMinimum/exclusiveMaximum for Draft 4
  • fix: Fix issue with base64-decoding content twice in contentMediaType validator
  • fix: Fix rebase conflicts
  • fix: Fix remote ref resolution to work in accordance with the official test suite
  • …and 212 more

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

jonasschmidt/ex_json_schema was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 18 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit d298fa91199482b72e8b00f24fbd80bfc94807fd — the exact code this score is about.
  • Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-5d04157a340d.