JSV.BooleanSchema (jsv v0.7.2)

View Source

Represents a boolean schema. Boolean schemas accept or reject any data according to their boolean value.

This is very often used with the additionalProperties keyword.

Summary

Functions

Returns a JSV.BooleanSchema struct wrapping the given boolean.

Types

t()

@type t() :: %JSV.BooleanSchema{
  schema_path: [JSV.Builder.path_segment()],
  valid?: boolean()
}

Functions

of(valid?, schema_path)

@spec of(boolean(), [JSV.Builder.path_segment()]) :: t()

Returns a JSV.BooleanSchema struct wrapping the given boolean.