All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[0.3.0] - 2026-11-10
Added
- Examples for every public function, documented types and a Phoenix quick start;
all
iex>examples in the docs and README run as tests. mix ref_data.initcreatespriv/ref_data/with an example dataset and prints the configuration to add.RefData.label/3returns the label for a stored value, for displaying saved choices.- Immutable catalogs loaded with
RefData.load/1and selected withsource:. - Submitted-value validation with canonical JSON values and explicit errors for unknown, disabled and ambiguous choices, including nested groups.
- Concurrent-read and storage lifecycle tests.
- Direct lookup API with
fetch/2,get!/2and configurable server selection. - Explicit supervision and independent named or unnamed instances.
- File-specific validation errors and duplicate dataset detection.
- Tests for malformed data, missing keys, empty datasets and grouped disabling.
Changed
- Require Elixir 1.18 or later (for the built-in
JSONmodule). - Breaking: the default server starts only when
config :ref_data, path: ...is set, so adding the dependency no longer fails startup whenref_data/is absent. - Pin development to Elixir 1.20.5 / OTP 29.1.2 and test Elixir 1.18 to 1.20 in CI.
- Replace the Jason runtime dependency with built-in
JSONdecoding. - Update all development dependencies and the lockfile.
- Represent grouped options as string-labelled tuples instead of atom-keyed lists.
- Return
nilfor missinggetlookups without crashing the shared server. - Use protected ETS tables for shared datasets; local reads bypass the owner mailbox.
- Keep immutable catalog lookups process-free and preserve option order.
- Publish tables through a supervised Registry and resolve restarted instances by PID.
- Preserve legacy server messages and remote-node lookups.
- Document release-safe paths, current configuration syntax and migration steps.
Fixed
- Disabling options in grouped datasets.
- Dynamic atom creation from JSON group labels.
- Crashes on empty datasets and unclear errors for invalid input.
[0.2.1] - 2021-03-10
Changed
- Documentation, package metadata and CI updates only; no library changes.
[0.2.0] - 2021-03-10
Added
- Supports more detailed
jsondefinitions to allow developers to add custom values
Fixed
- Modified generation of
mapsfromjsondefinitions to match the casing between key and value (e.g.{ "genders": ["Male", ...]}) will now create a map%{ "name" => "genders", "values" => [[ "key" => "Male", "value" => "Male"], ...]}rather than%{ "name" => "genders", "values" => [[ "key" => "Male", "value" => "male"], ...]}
Changed
- Removed the use of :ets, it is redundant given the nature of a GenServer and its role holding state
- Modified the Jason.decode funtion to include the
string: :copyoption. The RefData server is designed to run while your application is running and the defaultreferenceoption stops teh garbage collection of the originaljsondefinitons - Removed the use of the
:rawkey as it was redundant and the library no longer stores the raw json