Missing `optional_keys` option in Map schema
It is not possible to pass the optional_keys
option to the Map
schema. Map Interface it is cumbersome to use when defining larger Maps.
Map({
"name": Str(),
"date": Date(),
"email": Str(),
}, required_keys = ["name", "date"])
A much better option is to specify an optional_keys
. It will save a lot of time
Map({
"name": Str(),
"date": Date(),
"email": Str(),
}, optional_keys = ["email"])
Edited by Michał Kudela