Packages
xema
0.4.0
0.17.9
0.17.8
0.17.7
0.17.6
0.17.5
0.17.4
0.17.3
0.17.2
0.17.1
0.17.0
0.16.1
0.16.0
0.15.0
0.14.3
0.14.2
0.14.1
0.14.0
0.13.10
0.13.9
0.13.8
0.13.7
0.13.6
0.13.5
0.13.4
0.13.3
0.13.1
0.13.0
0.12.0
0.11.4
0.11.3
0.11.2
0.11.1
0.11.0
0.10.0
0.9.3
0.9.2
0.9.1
0.9.0
0.8.1
0.8.0
0.7.0
0.6.3
0.6.2
0.6.1
0.6.0
0.5.0
0.4.0
0.3.0
0.2.0
0.1.1
A schema validator inspired by JSON Schema.
Current section
Files
Jump to
Current section
Files
UNSUPPORTED_FEATURES.md
# Unsupported Features
## Keyword `default`
Xema don't support the keyword `default`.
## Unknown Properties
The following JSON-Schema is valid.
```JSON
{
"int": {
"type": "integer"
},
"properties": {
"num": {
"$ref": "#/int"
}
}
}
```
The equilant Xema schema will raise an error.
```Elixir
iex> Xema.new :any,
...> int: :integer,
...> properties: %{
...> num: {:ref, "#/int"}
...> }
** (Xema.SchemaError) Keywords [:int] are not supported by :any.
```
The correct schema would be.
```Elixir
iex> schema = Xema.new :any,
...> definitions: %{
...> int: :integer,
...> },
...> properties: %{
...> num: {:ref, "#/definitions/int"}
...> }
...> Xema.is_valid? schema, %{num: 123}
true
```