class JsonSchema

Methods

static Type
fromArray(array $schema)

Build a type from a raw array of the Hypervel-supported JSON Schema subset.

static Type
__callStatic(string $name, array $arguments)

Dynamically pass static methods to the schema instance.

static ObjectType
object(Closure|array<string $, Type> $properties = '[]')

No description

static AnyOfType
anyOf(Closure|array<int $, Type> $schemas)

No description

static IntegerType
integer()

No description

static NumberType
number()

No description

static StringType
string()

No description

static BooleanType
boolean()

No description

static ArrayType
array()

No description

static UnionType
union(array<int $, string> $types)

No description

Details

at line 38
static Type fromArray(array $schema)

Build a type from a raw array of the Hypervel-supported JSON Schema subset.

Parameters

array $schema

Return Value

Type

Exceptions

InvalidArgumentException

at line 46
static Type __callStatic(string $name, array $arguments)

Dynamically pass static methods to the schema instance.

Parameters

string $name
array $arguments

Return Value

Type

at line 29
static ObjectType object(Closure|array<string $, Type> $properties = '[]')

No description

Parameters

Closure|array<string $
Type> $properties

Return Value

ObjectType

at line 29
static AnyOfType anyOf(Closure|array<int $, Type> $schemas)

No description

Parameters

Closure|array<int $
Type> $schemas

Return Value

AnyOfType

at line 29
static IntegerType integer()

No description

Return Value

IntegerType

at line 29
static NumberType number()

No description

Return Value

NumberType

at line 29
static StringType string()

No description

Return Value

StringType

at line 29
static BooleanType boolean()

No description

Return Value

BooleanType

at line 29
static ArrayType array()

No description

Return Value

ArrayType

at line 29
static UnionType union(array<int $, string> $types)

No description

Parameters

array<int $
string> $types

Return Value

UnionType