Packages

A Simple JSON Schema library for Gleam

Current section

Files

Jump to
jscheam src jscheam@property.erl
Raw

src/jscheam@property.erl

-module(jscheam@property).
-compile([no_auto_import, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch]).
-define(FILEPATH, "src/jscheam/property.gleam").
-export_type([constraint/0, property/0, additional_properties/0, type/0]).
-type constraint() :: {enum, list(gleam@json:json())} | {pattern, binary()}.
-type property() :: {property,
binary(),
type(),
boolean(),
gleam@option:option(binary()),
list(constraint())}.
-type additional_properties() :: allow_any |
allow_explicit |
disallow |
{schema, type()}.
-type type() :: integer |
string |
boolean |
float |
null |
{object, list(property()), additional_properties()} |
{array, type()} |
{union, list(type())}.