anyOf

anyOf用于匹配给定schema中的一个或多个。

// a schema
{
    "anyOf": [
        { "type": "string" },
        { "type": "number" }
    ]
}
// success
"Yes"
// success
42
// failure
{ "Not a": "string or number" }

results matching ""

    No results matching ""