bamorim/typed_ecto_schema
71.1
Strong · 3 October 2026
1.3k
lines of production code
Elixir
primary language
2
measurements over time
What this system is
TypedEctoSchema is an Elixir library that enhances Ecto schemas by automatically generating precise typespecs and documentation based on field definitions. It supports complex schema features such as polymorphic embeds, many-to-many associations, and named enum types, while ensuring compile-time dependency isolation. The system allows developers to control field nullability, enforcement, and documentation generation through explicit schema options.
Features
TypedEctoSchema 0.5.0 release with field documentation, named enum types, and polymorphic embed support
This release introduces field documentation via the \:doc\ option, which is rendered into \@moduledoc\ using a marker and into a generated \@typedoc\. It also adds experimental opt-in named types for \Ecto.Enum\ fields (via \additional\_types: true\) and experimental support for \polymorphic\_embed\'s \polymorphic\_embeds\_one/2\ and \polymorphic\_embeds\_many/2\ (via \config :typed\_ecto\_schema, polymorphic\_embed: true\). Additionally, schema function options are no longer evaluated in the module body, preventing compile-time dependencies from pass-through options like \join\_through\. The CHANGELOG.md file is added to document these changes.
(repo-wide) · high confidence
Behavioural changes
Expanded schema macro support and improved type generation
TypedEctoSchema now supports \many\_to\_many\ associations, \polymorphic\_embeds\_one\/\many\ (when the optional library is enabled), and inline embeds. The type mapper handles \Ecto.Enum\ fields with specific value lists, keyed integer lists, and AST variable options, while also respecting \null\ and \enforce\ options on timestamps and primary keys. Additionally, users can opt-in to generating \@typedoc\ and \@moduledoc\ field documentation using a specific marker.
_lib/typed\_ecto\schema · high confidence
New schema and field options for nullability, enforcement, and documentation
TypedEctoSchema now supports \:null\, \:enforce\, and \:doc\ options on fields, allowing users to control whether fields appear as nullable in typespecs, enforce presence via \@enforce\_keys\, and include inline documentation in the module docs. Schema-level options \:opaque\ and the experimental \:additional\_types\ are also introduced, enabling opaque generated types and named types for Ecto.Enum and polymorphic embed fields. The library now explicitly handles \:null\ and \:enforce\ on \@primary\_key\ and \timestamps\, ensuring these options are stripped before reaching Ecto while affecting the generated typespecs.
lib · high confidence
Removal of legacy config/config.exs file
The legacy config/config.exs file, which previously handled application configuration via Mix.Config, has been removed from the project. This change eliminates the file responsible for loading configuration before dependencies and restricts configuration management to other locations, such as mix.exs or environment-specific files if re-introduced.
config · high confidence
Test coverage
Added test coverage for Ecto.Enum, many-to-many associations, and null constraints; Added tests for compile-time dependency isolation in typed schemas.
Dependencies
Update dependencies and project configuration for v0.5.0
This release updates the project's dependency versions and configuration in mix.exs and mix.lock. Key dependency upgrades include Ecto from 3.1.7 to 3.14.0, Credo from 1.1.1 to 1.7.18, Dialyxir from 1.0.0-rc.6 to 1.4.7, ExDoc from 0.21.0 to 0.40.3, and ExCoveralls from 0.11.1 to 0.18.5. The minimum supported Elixir version is raised from 1.7 to 1.9. Additionally, the project now includes polymorphic\_embed as a test dependency and adds package metadata (maintainers, license, links) and documentation extras (cheatsheet, guides, changelog).
(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 71 → 71 (+0.2)
- Rubric changed (rubric-2026.09.15 → rubric-2026.10.1) — scores are not directly comparable.
Lenses
- Code Health 100 → 100 (+0.0)
- Architecture 69 → 69 (+0.0)
- Maturity 62 → 62 (+0.0)
- Readiness 80 → 81 (+1.5)
- Security 98 → 99 (+0.3)
Resolved (2)
- Documentation: no installation or build instructions (README.md)
- Off-boarding risk: anonymized user #1
New (1)
- Off-boarding risk: anonymized user #1
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
bamorim/typed_ecto_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 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 30b2c2b4cf3df2db5f853881c0f6f55a95bcfa80 — 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-24c657e50118.