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

NameTypeDescription
typestringType of data that will be returned. Must be assigned as schema.
lengthnumberSets the default length when less than 0. This is optional.
schemaobjectDefines the data types to be returned as a schema object.