Releases: radix/sureberus
0.9.1 - when_key_is / schema bugfix
This bug fix release has a single change: when when_key_is
is used along with a schema
directive where the type-key is explicitly defined in the schema, that dict-field schema would be ignored.
0.9.0 - registries, new "fields" and "elements" directives
0.9.0 is a new feature release.
Registries
All the directives that accept Python functions now have support for registries of named functions. This includes coerce, coerce_post, validator, default_setter, and modify_context. See #15 for more information.
"fields" and "elements" replacing "schema"
The schema directive has been notoriously confusing because it means different things based on what data is being validated. It should no longer be used, and elements and fields should be preferred.
0.8.0
This release of Sureberus contains:
- A new, unified
choose_schema
directive which is where you putwhen_key_is
,when_key_exists
, orwhen_tag_is
directives. - New directives for contextual schemas,
set_key
,choose_schema
(withwhen_tag_is
), andmodify_context
. These let you select a schema based on context further up in the document. - Another new
choose_schema
subdirective namedfunction
, which allows you to run arbitrary Python code to determine which schema to apply. coerce_post
now runs after a customvalidator
.- complete documentation now available at https://radix.github.io/sureberus!
0.7.0
0.6.1 - bugfix to improve error messages in keyschema and valueschema
errors while validating keyschema and valueschema now pointing to the correct location in the source document.
0.6 - support for keyschema and valueschema
Support for keyschema and valueschema is now implemented. See #4 for some caveats.
0.5 - schema registries
Sureberus now supports schema registries, which allows for easy subschema reuse, and more importantly, recursive schemas.
0.4 - when_key_is / when_key_exists bugfixes
fix some bugs with recent when_key_is
and when_key_exists
changes:
- run
coerce
functions before when_key_*! this is necessary because they might convert e.g. from a string to a dict - improve errors around missing the key in when_key_is
- improve errors around when_key_* applied to non-dicts. They now imply that the type of the value is dict.
0.3
Initial release of Sureberus
Hello, world!