class JsonSchemaTypeFactory extends JsonSchema implements JsonSchema (View source)

Methods

static Type
fromArray(array $schema)

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

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

Dynamically pass static methods to the schema instance.

object(Closure|array $properties = [])

Create a new object schema instance.

array()

Create a new array property instance.

string()

Create a new string property instance.

integer()

Create a new integer property instance.

number()

Create a new number property instance.

boolean()

Create a new boolean property instance.

union(array $types)

Create a new multi-type union instance.

anyOf(Closure|array $schemas)

Create a new anyOf schema instance.

Details

static Type fromArray(array $schema)

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

Parameters

array $schema

Return Value

Type

Exceptions

InvalidArgumentException

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

Dynamically pass static methods to the schema instance.

Parameters

string $name
mixed $arguments

Return Value

Type

ObjectType object(Closure|array $properties = [])

Create a new object schema instance.

Parameters

Closure|array $properties

Return Value

ObjectType

ArrayType array()

Create a new array property instance.

Return Value

ArrayType

StringType string()

Create a new string property instance.

Return Value

StringType

IntegerType integer()

Create a new integer property instance.

Return Value

IntegerType

NumberType number()

Create a new number property instance.

Return Value

NumberType

BooleanType boolean()

Create a new boolean property instance.

Return Value

BooleanType

UnionType union(array $types)

Create a new multi-type union instance.

Parameters

array $types

Return Value

UnionType

AnyOfType anyOf(Closure|array $schemas)

Create a new anyOf schema instance.

Parameters

Closure|array $schemas

Return Value

AnyOfType