JsonSchemaTypeFactory
class JsonSchemaTypeFactory extends JsonSchema implements JsonSchema (View source)
Constants
| MAX_NODES |
The maximum number of schema fragments that may be expanded when deserializing or building rules. |
Methods
Build a type from a raw array of the Laravel-supported JSON Schema subset.
Get the Laravel validation rules for the properties of the given object schema.
Dynamically pass static methods to the schema instance.
Create a new object schema instance.
Create a new integer property instance.
Create a new number property instance.
Create a new string property instance.
Create a new boolean property instance.
Details
static Type
fromArray(array $schema)
Build a type from a raw array of the Laravel-supported JSON Schema subset.
static array
rules(Type|array $schema)
Get the Laravel validation rules for the properties of the given object schema.
static Type
__callStatic(string $name, mixed $arguments)
Dynamically pass static methods to the schema instance.
ObjectType
object(Type> $properties = [])
Create a new object schema instance.
IntegerType
integer()
Create a new integer property instance.
NumberType
number()
Create a new number property instance.
StringType
string()
Create a new string property instance.
BooleanType
boolean()
Create a new boolean property instance.
ArrayType
array()
Create a new array property instance.
UnionType
union(string> $types)
Create a new multi-type union instance.