Xema.Behaviour behaviour (xema v0.14.2) View Source

A behaviour module for implementing a schema validator. This behaviour is just for Xema and JsonXema.

Link to this section Summary

Types

t()

The schema container.

Callbacks

This callback initialize the schema. The function gets the data given to Xema.new/1 and returns a Xema.Schema.

Link to this section Types

Specs

t() :: struct()

The schema container.

Link to this section Callbacks

Specs

init(any(), keyword()) :: Xema.Schema.t()

This callback initialize the schema. The function gets the data given to Xema.new/1 and returns a Xema.Schema.