xema v0.6.3 Xema.Ref View Source
This module contains a struct and functions to represent and handle references.
Link to this section Summary
Functions
Creates a new reference from the given pointer
Creates a new reference from the given pointer
and uri
Validates the given value with the referenced schema
Link to this section Types
Link to this section Functions
Link to this function
new(pointer)
View Source
new(pointer)
View Source
new(String.t()) :: Xema.Ref.t()
new(String.t()) :: Xema.Ref.t()
Creates a new reference from the given pointer
.
Link to this function
new(pointer, uri)
View Source
new(pointer, uri)
View Source
new(String.t(), URI.t() | nil) :: Xema.Ref.t()
new(String.t(), URI.t() | nil) :: Xema.Ref.t()
Creates a new reference from the given pointer
and uri
.
Link to this function
validate(ref, value, opts)
View Source
validate(ref, value, opts)
View Source
validate(Xema.Ref.t() | Xema.Schema.t() | Xema.t(), any(), keyword()) ::
:ok | {:error, map()}
validate(Xema.Ref.t() | Xema.Schema.t() | Xema.t(), any(), keyword()) :: :ok | {:error, map()}
Validates the given value with the referenced schema.