Skip to content
CAI
Software that uses CAICheck a score

vic/params

57.0

Adequate · 3 October 2026

560

lines of production code

Elixir

primary language

2

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Params is an Elixir library that simplifies parameter validation and casting for API inputs by wrapping Ecto.Schema and Ecto.Changeset. It provides a declarative DSL for defining parameter schemas with support for nested structures and type casting, effectively reducing boilerplate in data processing. The system generates Ecto changesets and structs from these definitions, ensuring type safety and required field validation.

Features

Initial release of Params library with Ecto-based parameter validation

This entry marks the initial commit of the Params project, introducing a library that simplifies parameter validation and casting in Elixir by wrapping Ecto.Schema and Ecto.Changeset. The diff establishes the foundational project structure, including the Apache 2.0 license, a .gitignore for Mix artifacts, and a CHANGELOG.md documenting versions from v0.0.2 up to v2.3.0. The README provides comprehensive documentation and examples, demonstrating how to use the \defparams\ macro to define parameter schemas with type casting, required/optional fields, and nested structures, effectively replacing manual changeset boilerplate for API parameter processing.

(repo-wide) · high confidence

Behavioural changes

Migrate configuration syntax from Mix.Config to Config

The application's configuration file has been updated to use the modern \import Config\ syntax instead of the deprecated \use Mix.Config\. This change suppresses deprecation warnings and ensures compatibility with current Elixir standards for loading application settings.

config · high confidence

New DSL for defining parameter schemas with embedded support

The library introduces a new declarative approach to defining parameter schemas via the \Params.Def.defparams/2\ macro and updated \Params.Schema\ usage. Users can now define schemas using a map-based DSL (e.g., \use Params.Schema, %{field!: :type}\) which automatically generates Ecto structs and changesets, supporting nested embedded schemas and array types. This replaces the previous implicit behavior with an explicit, reusable module generation strategy that scopes created modules to the defining namespace and allows custom changeset logic via options.

lib/params · high confidence

Reworked parameter processing API with new macros and helper functions

The library introduces a \use Params\ macro that imports \defparams\ and \defschema\ for defining parameter schemas, replacing the previous \from/3\ function. The public API now exposes \Params.to\_map/1\ and \Params.data/1\ to transform Ecto changesets into maps or structs respectively, handling nested embedded changesets recursively. Internal changes include refactoring the \changeset/2\ logic to use \Changeset.cast\ and \Changeset.validate\required\ directly, and updating helper functions like \optional/1\ to call \\\changeset\\_()\ as a function rather than accessing it as a map attribute.

lib · high confidence

Test coverage

Added tests for defparams macro and OTP 26+ compatibility

This update adds comprehensive tests for the new \defparams\ macro, verifying that generated schemas correctly identify required and optional fields and produce valid changesets for simple, embedded one, and embedded many relationships. It also includes a fix for OTP 26+ compatibility by sorting field lists in assertions, as map key order is no longer guaranteed.

test · high confidence

Dependencies

Upgrade to Ecto 3 and Elixir 1.15 with updated tooling

The project now requires Elixir 1.15 and has upgraded its primary dependency from Ecto 1 to Ecto 3 (supporting versions \~\> 2.0 or \~\> 3.0). This change also updates development tooling, replacing Credo and mix\_test\_watch with ExDoc 0.34 and Dialyxir 0.5, and adds Dialyzer configuration to the project 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

Score

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

Lenses

  • Code Health 100 → 100 (-0.3)
  • Architecture 69 → 69 (+0.0)
  • Maturity 36 → 36 (+0.0)
  • Readiness 67 → 69 (+2.4)
  • Security 100 → 100 (+0.1)

Resolved (1)

  • Documentation: no usage examples (README.md)

New (1)

  • Duplicated block (6 lines × 2) (lib/params.ex)

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

Survey your own repository

vic/params 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 d451fb2f9ba89b504ef6f38c6d4552eae51512a2 — 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.