Schema validation at the collection level - ip address

Can we have a field (in json schema) and make sure it will be IPV4 or IPV6 only. I know RegEx can work here - the question is: is there something out of the box?

Like the below:

"$schema": "",
"title": "test",
"type": "object",
"properties": {
    "type": {"enum": ["spice", "vnc"]},
    "listen": {
        "type": "string",
        "format": "ip-address"
"additionalProperties": false

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.