xema v0.1.1 Xema.Map View Source
This module contains the struct for the keywords of type map
.
Usually this struct will be just used by xema
.
Examples
iex> import Xema
Xema
iex> schema = xema :map
%Xema{type: %Xema.Map{}}
iex> schema.type == %Xema.Map{}
true
Link to this section Summary
Link to this section Types
Link to this type
t()
View Source
t() :: %Xema.Map{additional_properties: boolean() | nil, as: atom(), dependencies: list() | map() | nil, keys: atom() | nil, max_properties: pos_integer() | nil, min_properties: pos_integer() | nil, pattern_properties: map() | nil, properties: map() | nil, required: MapSet.t() | nil}
The struct contains the keywords for the type map
.
additional_properties
disallow additional properties, if set to trueas
is used in an error report. Default ofas
is:list
dependencies
allows the schema of the map to change based on the presence of certain special propertieskeys
could be:atoms
or:strings
max_properties
the maximum count of properties for the mapmin_properties
the minimal count of properties for the mappattern_properties
specifies schemas for properties by patternsproperties
specifies schemas for propertiesrequired
contains a set of required properties