Skip to content
CAI
Software that uses CAICheck a score

beam-community/jsonapi

72.9

Strong · 3 October 2026

2.3k

lines of production code

Elixir

primary language

2

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

This system is a JSON:API library for Elixir/Plug applications that provides serialization, query parsing, and request validation. It enables developers to build specification-compliant APIs by handling polymorphic resources, relationship inclusion, and parameter normalization through a suite of configurable plugs and utilities. The codebase includes comprehensive test coverage for its core serialization logic and validation layers.

Features

Add JSONAPI module for JSON encoding and MIME type configuration

A new JSONAPI module has been added to the library, providing a centralized way to configure the JSON encoding library (defaulting to Jason) and retrieve the standard JSON API MIME type. Users can now customize the JSON encoder via application configuration, with error handling that guides them if the specified module is not available.

lib · high confidence

Introduces JSON:API specification-compliant plugs

This change adds a suite of new plugs to \lib/jsonapi/plugs\ to enforce the JSON:API specification. \JSONAPI.ContentTypeNegotiation\ validates Content-Type and Accept headers, returning 415 or 406 errors as required. \JSONAPI.Deserializer\ flattens incoming JSON:API payloads into a simpler parameter structure for easier controller handling. \JSONAPI.FormatRequired\ and \JSONAPI.IdRequired\ validate request bodies, ensuring correct data structures and matching IDs for PATCH/DELETE operations. \JSONAPI.QueryParser\ implements full support for sorting, filtering, sparse fieldsets, includes, and pagination according to the spec. \JSONAPI.UnderscoreParameters\ converts dasherized keys to underscores, and \JSONAPI.ResponseContentType\ ensures correct response headers. \JSONAPI.EnsureSpec\ consolidates these plugs into a single helper for easy integration.

lib/jsonapi/plugs · high confidence

New utility modules for JSON:API parameter conversion and string transformation

This change introduces four new utility modules in \lib/jsonapi/utils\ to support JSON:API resource handling. \DataToParams\ converts JSON:API resource objects (including attributes, relationships, and included resources) into flat maps suitable for changeset casting, handling relationship ID extraction and list-based relationships. \IncludeTree\ provides internal helpers for building and traversing trees of resource relationships. \List\ transforms maps into query-string-compatible tuple lists, supporting nested filters and array parameters. \String\ centralizes string manipulation logic, offering \camelize\, \dasherize\, \underscore\, and \expand\_fields\ functions with support for shallow and deep transformations, replacing previous ad-hoc implementations.

lib/jsonapi/utils · high confidence

Polymorphic resource support and configurable includes post-processing

The library now supports polymorphic resources, allowing a single view module to serialize different data types dynamically by implementing \polymorphic\_type/1\, \polymorphic\_fields/1\, and optionally \polymorphic\_relationships/1\ callbacks. Additionally, the \JSONAPI.Config\ struct now includes an \includes\_post\_processor\ field, enabling users to customize how included resources are processed (defaulting to \Enum.uniq/1\) before serialization.

lib/jsonapi · high confidence

Behavioural changes

Added placeholder for PLT cache directory

A .gitkeep file has been added to the priv/plts directory to ensure the directory is tracked by version control, supporting the caching of PLT (Plain Language Text) files used by tools like Dialyzer.

priv · high confidence

Test coverage

Added comprehensive test coverage for JSON:API serializer and view behaviors; Added test coverage for JSON:API request and validation plugs; Added tests for JSONAPI utility modules; Initial test suite for JSON API serialization and relationships.

Dependencies

Initial release of JSONAPI v1.14.3

This change introduces the initial version of the JSONAPI library (v1.14.3), providing a fully functional JSONAPI V1 serializer and query parser for Plug-based projects. The package defines its core dependencies, including Plug (\~\> 1.10) and optional Jason, along with development tools like Credo, Dialyxir, and ExDoc, establishing the baseline for the project.

(dependencies) · high confidence

Housekeeping

Repository maintenance and configuration sync

This update synchronizes the project's development tooling and configuration files with the beam-community/common-config standard. It introduces new configuration files for commit linting (.commitlintrc.yml), code formatting (.formatter.exs), and static analysis (.credo.exs), while also updating the Erlang/Elixir tool versions (.tool-versions) and standardizing the project license header to reflect the BEAM Community ownership.

(repo-wide) · 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

Score

  • CAI 72 → 73 (+0.6)
  • Rubric changed (rubric-2026.09.15 → rubric-2026.10.1) — scores are not directly comparable.

Lenses

  • Code Health 100 → 100 (+0.0)
  • Architecture 99 → 99 (+0.2)
  • Maturity 56 → 56 (+0.0)
  • Readiness 83 → 84 (+0.9)
  • Security 85 → 87 (+2.6)

Resolved (2)

  • Documentation: no installation or build instructions (README.md)
  • Documentation: no usage examples (README.md)

Changes since last survey

  • 1 commits — 1 feature/other, 0 fixes

By area

  • (root) — 1 commit

Notable commits

  • change: chore(deps): bump phoenix from 1.8.13 to 1.8.14 in the dev group (#470)

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

Survey your own repository

beam-community/jsonapi 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 3 October 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 7491a221dfd88f88df7abeabb1f573ecadf32c96 — the exact code this score is about.
  • Scored under rubric-2026.10.1 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-8fe32cd45d00.