- [Parameter] Fix
nil
default values not being shown on load/dump output.
- [Parameter]
on_load/2
oron_dump/2
now always run when parsing the schema. Previously, both functions were only triggered when the field was present on the params.
- [Parameter.Schema.Compiler] Unify schema compiler for macro and functional API.
- [Parameter.Types.Any] Renamed module to
Parameter.Types.AnyType
to fix elixir warnings - [Parameter] Fix
load
,dump
andvalidate
functions to correctly parse Enum values in nested schema. - [Parameter.Schema] default options for nested schema is now available.
- [Parameter.Schema] Add a description on what
use Parameter.Schema
does.
- [Parameter.Types.List] removed type in favor of
Array
type
- [Parameter] Extra option
ignore_empty
forload/2
anddump/2
functions. - [Parameter.Schema]
has_one
andhas_many
nested types asmap
andarray
composite types.
- [Parameter.Enum] removed enum value macro with the
as
key.
- [Parameter] Extra option
ignore_nil
forload/2
anddump/2
functions. - [Parameter.Types] New
array
type. - [Parameter.Schema] Support for nested type on
map
andarray
. - Improved code test coverage to 100%.
- [Parameter.Field] Support for
on_load/2
andon_dump/2
functions in field definition.
- [Parameter.Schema] Supports
compile/1
function for compiling runtime schemas. - [Parameter]
load/3
,validate/3
anddump/3
now support evaluating parameters using runtime schemas. - [Parameter.Validators] Improved
length/2
validator to supportmin
and/ormax
attributes. Before it was only accepting both.
- [Parameter] Fix a bug where
load/3
andvalidate/3
was evaluating thevalidator
option wrongly. - [Parameter.Field] Validator typespec.
- [Parameter.Enum] Fix evaluation of enum values inside
Enum
macro
- [Parameter] New
validate/3
function - [Parameter] Supports for
load/3
parsing maps with atom keys - [Parameter.Schema] Supports for
fields_required
module attribute on schema
- [Parameter]
dump/3
function to load the value to be dumped - [Parameter] consider basic types when loading, dumping or validating a schema
- [Parameter.Field] remove compile time verification for custom types
- [Parameter] API changes to support new parameter_ecto library
- [Parameter] Support for
many
flag onload/3
anddump/3
options - [Parameter] Errors when parsing list return as map with
%{index => reason}
now instead of{:#{index}, reason}
to avoid atom creation - [Parameter.Field] Support for
load_default
anddump_default
options - [Parameter.Enum] Deprecated
as
in favour ofkey
- [Parameter.Field] Return
default
value when callingParameter.dump/3
with empty value.
- [Parameter] Support for
exclude
option forload/3
anddump/3
. - [Parameter.Types] Support for
any
type - [Parameter.Schema] Support for virtual fields