Schema type
Schema type structure
Overview
The schema type is designed to create secondary schemas and returns them as objects, allowing the user to create more complex data hierarchies.
{
"key": {
"type": "schema",
"length": 2,
"schema": {
"name": "name",
"age": {
"type": "number",
"min": 18,
"max": 60
}
}
}
}
Parameters
| Name | Type | Description |
|---|---|---|
type | string | Type of data that will be returned. Must be assigned as schema. |
length | number | Sets the default length when less than 0. This is optional. |
schema | object | Defines the data types to be returned as a schema object. |