{
  "$defs": {
    "octodns_meta": {
      "additionalProperties": true,
      "properties": {
        "excluded": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "healthcheck": {
          "additionalProperties": true,
          "properties": {
            "host": {
              "type": [
                "string",
                "null"
              ]
            },
            "path": {
              "type": "string"
            },
            "port": {
              "maximum": 65535,
              "minimum": 0,
              "type": "integer"
            },
            "protocol": {
              "enum": [
                "HTTP",
                "HTTPS",
                "ICMP",
                "TCP",
                "UDP"
              ],
              "type": "string"
            }
          },
          "type": "object"
        },
        "ignored": {
          "type": "boolean"
        },
        "included": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "lenient": {
          "type": "boolean"
        }
      },
      "type": "object"
    },
    "record": {
      "allOf": [
        {
          "if": {
            "properties": {
              "type": {
                "const": "A"
              }
            },
            "required": [
              "type"
            ]
          },
          "then": {
            "properties": {
              "dynamic": {
                "properties": {
                  "pools": {
                    "additionalProperties": {
                      "properties": {
                        "fallback": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "values": {
                          "items": {
                            "properties": {
                              "status": {
                                "enum": [
                                  "up",
                                  "down",
                                  "obey"
                                ]
                              },
                              "value": {
                                "format": "ipv4",
                                "type": "string"
                              },
                              "weight": {
                                "maximum": 100,
                                "minimum": 1,
                                "type": "integer"
                              }
                            },
                            "required": [
                              "value"
                            ],
                            "type": "object"
                          },
                          "minItems": 1,
                          "type": "array"
                        }
                      },
                      "required": [
                        "values"
                      ],
                      "type": "object"
                    },
                    "minProperties": 1,
                    "type": "object"
                  },
                  "rules": {
                    "items": {
                      "properties": {
                        "geos": {
                          "items": {
                            "pattern": "^[A-Z]{2}(-[A-Z]{2}(-[A-Z]{2})?)?$",
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "pool": {
                          "type": "string"
                        },
                        "subnets": {
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        }
                      },
                      "required": [
                        "pool"
                      ],
                      "type": "object"
                    },
                    "minItems": 1,
                    "type": "array"
                  }
                },
                "required": [
                  "pools",
                  "rules"
                ],
                "type": "object"
              },
              "geo": {
                "additionalProperties": {
                  "items": {
                    "format": "ipv4",
                    "type": "string"
                  },
                  "minItems": 1,
                  "type": "array"
                },
                "propertyNames": {
                  "pattern": "^[A-Z]{2}(-[A-Z]{2}(-[A-Z]{2})?)?$"
                },
                "type": "object"
              },
              "value": {
                "format": "ipv4",
                "type": "string"
              },
              "values": {
                "items": {
                  "format": "ipv4",
                  "type": "string"
                },
                "minItems": 1,
                "type": "array"
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "type": {
                "const": "AAAA"
              }
            },
            "required": [
              "type"
            ]
          },
          "then": {
            "properties": {
              "dynamic": {
                "properties": {
                  "pools": {
                    "additionalProperties": {
                      "properties": {
                        "fallback": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "values": {
                          "items": {
                            "properties": {
                              "status": {
                                "enum": [
                                  "up",
                                  "down",
                                  "obey"
                                ]
                              },
                              "value": {
                                "format": "ipv6",
                                "type": "string"
                              },
                              "weight": {
                                "maximum": 100,
                                "minimum": 1,
                                "type": "integer"
                              }
                            },
                            "required": [
                              "value"
                            ],
                            "type": "object"
                          },
                          "minItems": 1,
                          "type": "array"
                        }
                      },
                      "required": [
                        "values"
                      ],
                      "type": "object"
                    },
                    "minProperties": 1,
                    "type": "object"
                  },
                  "rules": {
                    "items": {
                      "properties": {
                        "geos": {
                          "items": {
                            "pattern": "^[A-Z]{2}(-[A-Z]{2}(-[A-Z]{2})?)?$",
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "pool": {
                          "type": "string"
                        },
                        "subnets": {
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        }
                      },
                      "required": [
                        "pool"
                      ],
                      "type": "object"
                    },
                    "minItems": 1,
                    "type": "array"
                  }
                },
                "required": [
                  "pools",
                  "rules"
                ],
                "type": "object"
              },
              "geo": {
                "additionalProperties": {
                  "items": {
                    "format": "ipv6",
                    "type": "string"
                  },
                  "minItems": 1,
                  "type": "array"
                },
                "propertyNames": {
                  "pattern": "^[A-Z]{2}(-[A-Z]{2}(-[A-Z]{2})?)?$"
                },
                "type": "object"
              },
              "value": {
                "format": "ipv6",
                "type": "string"
              },
              "values": {
                "items": {
                  "format": "ipv6",
                  "type": "string"
                },
                "minItems": 1,
                "type": "array"
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "type": {
                "const": "ALIAS"
              }
            },
            "required": [
              "type"
            ]
          },
          "then": {
            "properties": {
              "value": {
                "type": "string"
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "type": {
                "const": "CAA"
              }
            },
            "required": [
              "type"
            ]
          },
          "then": {
            "properties": {
              "value": {
                "properties": {
                  "flags": {
                    "maximum": 255,
                    "minimum": 0,
                    "type": "integer"
                  },
                  "tag": {
                    "type": "string"
                  },
                  "value": {
                    "type": "string"
                  }
                },
                "required": [
                  "tag",
                  "value"
                ],
                "type": "object"
              },
              "values": {
                "items": {
                  "properties": {
                    "flags": {
                      "maximum": 255,
                      "minimum": 0,
                      "type": "integer"
                    },
                    "tag": {
                      "type": "string"
                    },
                    "value": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "tag",
                    "value"
                  ],
                  "type": "object"
                },
                "minItems": 1,
                "type": "array"
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "type": {
                "const": "CNAME"
              }
            },
            "required": [
              "type"
            ]
          },
          "then": {
            "properties": {
              "dynamic": {
                "properties": {
                  "pools": {
                    "additionalProperties": {
                      "properties": {
                        "fallback": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "values": {
                          "items": {
                            "properties": {
                              "status": {
                                "enum": [
                                  "up",
                                  "down",
                                  "obey"
                                ]
                              },
                              "value": {
                                "type": "string"
                              },
                              "weight": {
                                "maximum": 100,
                                "minimum": 1,
                                "type": "integer"
                              }
                            },
                            "required": [
                              "value"
                            ],
                            "type": "object"
                          },
                          "minItems": 1,
                          "type": "array"
                        }
                      },
                      "required": [
                        "values"
                      ],
                      "type": "object"
                    },
                    "minProperties": 1,
                    "type": "object"
                  },
                  "rules": {
                    "items": {
                      "properties": {
                        "geos": {
                          "items": {
                            "pattern": "^[A-Z]{2}(-[A-Z]{2}(-[A-Z]{2})?)?$",
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "pool": {
                          "type": "string"
                        },
                        "subnets": {
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        }
                      },
                      "required": [
                        "pool"
                      ],
                      "type": "object"
                    },
                    "minItems": 1,
                    "type": "array"
                  }
                },
                "required": [
                  "pools",
                  "rules"
                ],
                "type": "object"
              },
              "value": {
                "type": "string"
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "type": {
                "const": "DNAME"
              }
            },
            "required": [
              "type"
            ]
          },
          "then": {
            "properties": {
              "dynamic": {
                "properties": {
                  "pools": {
                    "additionalProperties": {
                      "properties": {
                        "fallback": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "values": {
                          "items": {
                            "properties": {
                              "status": {
                                "enum": [
                                  "up",
                                  "down",
                                  "obey"
                                ]
                              },
                              "value": {
                                "type": "string"
                              },
                              "weight": {
                                "maximum": 100,
                                "minimum": 1,
                                "type": "integer"
                              }
                            },
                            "required": [
                              "value"
                            ],
                            "type": "object"
                          },
                          "minItems": 1,
                          "type": "array"
                        }
                      },
                      "required": [
                        "values"
                      ],
                      "type": "object"
                    },
                    "minProperties": 1,
                    "type": "object"
                  },
                  "rules": {
                    "items": {
                      "properties": {
                        "geos": {
                          "items": {
                            "pattern": "^[A-Z]{2}(-[A-Z]{2}(-[A-Z]{2})?)?$",
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "pool": {
                          "type": "string"
                        },
                        "subnets": {
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        }
                      },
                      "required": [
                        "pool"
                      ],
                      "type": "object"
                    },
                    "minItems": 1,
                    "type": "array"
                  }
                },
                "required": [
                  "pools",
                  "rules"
                ],
                "type": "object"
              },
              "value": {
                "type": "string"
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "type": {
                "const": "DS"
              }
            },
            "required": [
              "type"
            ]
          },
          "then": {
            "properties": {
              "value": {
                "anyOf": [
                  {
                    "required": [
                      "key_tag",
                      "algorithm",
                      "digest_type",
                      "digest"
                    ]
                  },
                  {
                    "required": [
                      "flags",
                      "protocol",
                      "algorithm",
                      "public_key"
                    ]
                  }
                ],
                "properties": {
                  "algorithm": {
                    "maximum": 255,
                    "minimum": 0,
                    "type": "integer"
                  },
                  "digest": {
                    "type": "string"
                  },
                  "digest_type": {
                    "maximum": 255,
                    "minimum": 0,
                    "type": "integer"
                  },
                  "flags": {
                    "type": "integer"
                  },
                  "key_tag": {
                    "maximum": 65535,
                    "minimum": 0,
                    "type": "integer"
                  },
                  "protocol": {
                    "type": "integer"
                  },
                  "public_key": {
                    "type": "string"
                  }
                },
                "type": "object"
              },
              "values": {
                "items": {
                  "anyOf": [
                    {
                      "required": [
                        "key_tag",
                        "algorithm",
                        "digest_type",
                        "digest"
                      ]
                    },
                    {
                      "required": [
                        "flags",
                        "protocol",
                        "algorithm",
                        "public_key"
                      ]
                    }
                  ],
                  "properties": {
                    "algorithm": {
                      "maximum": 255,
                      "minimum": 0,
                      "type": "integer"
                    },
                    "digest": {
                      "type": "string"
                    },
                    "digest_type": {
                      "maximum": 255,
                      "minimum": 0,
                      "type": "integer"
                    },
                    "flags": {
                      "type": "integer"
                    },
                    "key_tag": {
                      "maximum": 65535,
                      "minimum": 0,
                      "type": "integer"
                    },
                    "protocol": {
                      "type": "integer"
                    },
                    "public_key": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                },
                "minItems": 1,
                "type": "array"
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "type": {
                "const": "HTTPS"
              }
            },
            "required": [
              "type"
            ]
          },
          "then": {
            "properties": {
              "value": {
                "properties": {
                  "svcparams": {
                    "additionalProperties": true,
                    "type": "object"
                  },
                  "svcpriority": {
                    "maximum": 65535,
                    "minimum": 0,
                    "type": "integer"
                  },
                  "targetname": {
                    "type": "string"
                  }
                },
                "required": [
                  "svcpriority",
                  "targetname"
                ],
                "type": "object"
              },
              "values": {
                "items": {
                  "properties": {
                    "svcparams": {
                      "additionalProperties": true,
                      "type": "object"
                    },
                    "svcpriority": {
                      "maximum": 65535,
                      "minimum": 0,
                      "type": "integer"
                    },
                    "targetname": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "svcpriority",
                    "targetname"
                  ],
                  "type": "object"
                },
                "minItems": 1,
                "type": "array"
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "type": {
                "const": "LOC"
              }
            },
            "required": [
              "type"
            ]
          },
          "then": {
            "properties": {
              "value": {
                "properties": {
                  "altitude": {
                    "maximum": 42849672.95,
                    "minimum": -100000.0,
                    "type": "number"
                  },
                  "lat_degrees": {
                    "maximum": 90,
                    "minimum": 0,
                    "type": "integer"
                  },
                  "lat_direction": {
                    "enum": [
                      "N",
                      "S"
                    ]
                  },
                  "lat_minutes": {
                    "maximum": 59,
                    "minimum": 0,
                    "type": "integer"
                  },
                  "lat_seconds": {
                    "maximum": 59.999,
                    "minimum": 0,
                    "type": "number"
                  },
                  "long_degrees": {
                    "maximum": 180,
                    "minimum": 0,
                    "type": "integer"
                  },
                  "long_direction": {
                    "enum": [
                      "E",
                      "W"
                    ]
                  },
                  "long_minutes": {
                    "maximum": 59,
                    "minimum": 0,
                    "type": "integer"
                  },
                  "long_seconds": {
                    "maximum": 59.999,
                    "minimum": 0,
                    "type": "number"
                  },
                  "precision_horz": {
                    "maximum": 90000000.0,
                    "minimum": 0,
                    "type": "number"
                  },
                  "precision_vert": {
                    "maximum": 90000000.0,
                    "minimum": 0,
                    "type": "number"
                  },
                  "size": {
                    "maximum": 90000000.0,
                    "minimum": 0,
                    "type": "number"
                  }
                },
                "required": [
                  "lat_degrees",
                  "lat_minutes",
                  "lat_seconds",
                  "lat_direction",
                  "long_degrees",
                  "long_minutes",
                  "long_seconds",
                  "long_direction",
                  "altitude",
                  "size",
                  "precision_horz",
                  "precision_vert"
                ],
                "type": "object"
              },
              "values": {
                "items": {
                  "properties": {
                    "altitude": {
                      "maximum": 42849672.95,
                      "minimum": -100000.0,
                      "type": "number"
                    },
                    "lat_degrees": {
                      "maximum": 90,
                      "minimum": 0,
                      "type": "integer"
                    },
                    "lat_direction": {
                      "enum": [
                        "N",
                        "S"
                      ]
                    },
                    "lat_minutes": {
                      "maximum": 59,
                      "minimum": 0,
                      "type": "integer"
                    },
                    "lat_seconds": {
                      "maximum": 59.999,
                      "minimum": 0,
                      "type": "number"
                    },
                    "long_degrees": {
                      "maximum": 180,
                      "minimum": 0,
                      "type": "integer"
                    },
                    "long_direction": {
                      "enum": [
                        "E",
                        "W"
                      ]
                    },
                    "long_minutes": {
                      "maximum": 59,
                      "minimum": 0,
                      "type": "integer"
                    },
                    "long_seconds": {
                      "maximum": 59.999,
                      "minimum": 0,
                      "type": "number"
                    },
                    "precision_horz": {
                      "maximum": 90000000.0,
                      "minimum": 0,
                      "type": "number"
                    },
                    "precision_vert": {
                      "maximum": 90000000.0,
                      "minimum": 0,
                      "type": "number"
                    },
                    "size": {
                      "maximum": 90000000.0,
                      "minimum": 0,
                      "type": "number"
                    }
                  },
                  "required": [
                    "lat_degrees",
                    "lat_minutes",
                    "lat_seconds",
                    "lat_direction",
                    "long_degrees",
                    "long_minutes",
                    "long_seconds",
                    "long_direction",
                    "altitude",
                    "size",
                    "precision_horz",
                    "precision_vert"
                  ],
                  "type": "object"
                },
                "minItems": 1,
                "type": "array"
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "type": {
                "const": "MX"
              }
            },
            "required": [
              "type"
            ]
          },
          "then": {
            "properties": {
              "value": {
                "allOf": [
                  {
                    "anyOf": [
                      {
                        "required": [
                          "preference"
                        ]
                      },
                      {
                        "required": [
                          "priority"
                        ]
                      }
                    ]
                  },
                  {
                    "anyOf": [
                      {
                        "required": [
                          "exchange"
                        ]
                      },
                      {
                        "required": [
                          "value"
                        ]
                      }
                    ]
                  }
                ],
                "properties": {
                  "exchange": {
                    "type": "string"
                  },
                  "preference": {
                    "maximum": 65535,
                    "minimum": 0,
                    "type": "integer"
                  },
                  "priority": {
                    "maximum": 65535,
                    "minimum": 0,
                    "type": "integer"
                  },
                  "value": {
                    "type": "string"
                  }
                },
                "type": "object"
              },
              "values": {
                "items": {
                  "allOf": [
                    {
                      "anyOf": [
                        {
                          "required": [
                            "preference"
                          ]
                        },
                        {
                          "required": [
                            "priority"
                          ]
                        }
                      ]
                    },
                    {
                      "anyOf": [
                        {
                          "required": [
                            "exchange"
                          ]
                        },
                        {
                          "required": [
                            "value"
                          ]
                        }
                      ]
                    }
                  ],
                  "properties": {
                    "exchange": {
                      "type": "string"
                    },
                    "preference": {
                      "maximum": 65535,
                      "minimum": 0,
                      "type": "integer"
                    },
                    "priority": {
                      "maximum": 65535,
                      "minimum": 0,
                      "type": "integer"
                    },
                    "value": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                },
                "minItems": 1,
                "type": "array"
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "type": {
                "const": "NAPTR"
              }
            },
            "required": [
              "type"
            ]
          },
          "then": {
            "properties": {
              "value": {
                "properties": {
                  "flags": {
                    "enum": [
                      "S",
                      "A",
                      "U",
                      "P",
                      "s",
                      "a",
                      "u",
                      "p"
                    ]
                  },
                  "order": {
                    "maximum": 65535,
                    "minimum": 0,
                    "type": "integer"
                  },
                  "preference": {
                    "maximum": 65535,
                    "minimum": 0,
                    "type": "integer"
                  },
                  "regexp": {
                    "type": "string"
                  },
                  "replacement": {
                    "type": "string"
                  },
                  "service": {
                    "type": "string"
                  }
                },
                "required": [
                  "order",
                  "preference",
                  "flags",
                  "service",
                  "regexp",
                  "replacement"
                ],
                "type": "object"
              },
              "values": {
                "items": {
                  "properties": {
                    "flags": {
                      "enum": [
                        "S",
                        "A",
                        "U",
                        "P",
                        "s",
                        "a",
                        "u",
                        "p"
                      ]
                    },
                    "order": {
                      "maximum": 65535,
                      "minimum": 0,
                      "type": "integer"
                    },
                    "preference": {
                      "maximum": 65535,
                      "minimum": 0,
                      "type": "integer"
                    },
                    "regexp": {
                      "type": "string"
                    },
                    "replacement": {
                      "type": "string"
                    },
                    "service": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "order",
                    "preference",
                    "flags",
                    "service",
                    "regexp",
                    "replacement"
                  ],
                  "type": "object"
                },
                "minItems": 1,
                "type": "array"
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "type": {
                "const": "NS"
              }
            },
            "required": [
              "type"
            ]
          },
          "then": {
            "properties": {
              "value": {
                "type": "string"
              },
              "values": {
                "items": {
                  "type": "string"
                },
                "minItems": 1,
                "type": "array"
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "type": {
                "const": "OPENPGPKEY"
              }
            },
            "required": [
              "type"
            ]
          },
          "then": {
            "properties": {
              "value": {
                "type": "string"
              },
              "values": {
                "items": {
                  "type": "string"
                },
                "minItems": 1,
                "type": "array"
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "type": {
                "const": "PTR"
              }
            },
            "required": [
              "type"
            ]
          },
          "then": {
            "properties": {
              "value": {
                "type": "string"
              },
              "values": {
                "items": {
                  "type": "string"
                },
                "minItems": 1,
                "type": "array"
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "type": {
                "const": "SPF"
              }
            },
            "required": [
              "type"
            ]
          },
          "then": {
            "properties": {
              "value": {
                "type": "string"
              },
              "values": {
                "items": {
                  "type": "string"
                },
                "minItems": 1,
                "type": "array"
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "type": {
                "const": "SRV"
              }
            },
            "required": [
              "type"
            ]
          },
          "then": {
            "properties": {
              "value": {
                "properties": {
                  "port": {
                    "maximum": 65535,
                    "minimum": 0,
                    "type": "integer"
                  },
                  "priority": {
                    "maximum": 65535,
                    "minimum": 0,
                    "type": "integer"
                  },
                  "target": {
                    "type": "string"
                  },
                  "weight": {
                    "maximum": 65535,
                    "minimum": 0,
                    "type": "integer"
                  }
                },
                "required": [
                  "priority",
                  "weight",
                  "port",
                  "target"
                ],
                "type": "object"
              },
              "values": {
                "items": {
                  "properties": {
                    "port": {
                      "maximum": 65535,
                      "minimum": 0,
                      "type": "integer"
                    },
                    "priority": {
                      "maximum": 65535,
                      "minimum": 0,
                      "type": "integer"
                    },
                    "target": {
                      "type": "string"
                    },
                    "weight": {
                      "maximum": 65535,
                      "minimum": 0,
                      "type": "integer"
                    }
                  },
                  "required": [
                    "priority",
                    "weight",
                    "port",
                    "target"
                  ],
                  "type": "object"
                },
                "minItems": 1,
                "type": "array"
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "type": {
                "const": "SSHFP"
              }
            },
            "required": [
              "type"
            ]
          },
          "then": {
            "properties": {
              "value": {
                "properties": {
                  "algorithm": {
                    "enum": [
                      1,
                      2,
                      3,
                      4
                    ]
                  },
                  "fingerprint": {
                    "type": "string"
                  },
                  "fingerprint_type": {
                    "enum": [
                      1,
                      2
                    ]
                  }
                },
                "required": [
                  "algorithm",
                  "fingerprint_type",
                  "fingerprint"
                ],
                "type": "object"
              },
              "values": {
                "items": {
                  "properties": {
                    "algorithm": {
                      "enum": [
                        1,
                        2,
                        3,
                        4
                      ]
                    },
                    "fingerprint": {
                      "type": "string"
                    },
                    "fingerprint_type": {
                      "enum": [
                        1,
                        2
                      ]
                    }
                  },
                  "required": [
                    "algorithm",
                    "fingerprint_type",
                    "fingerprint"
                  ],
                  "type": "object"
                },
                "minItems": 1,
                "type": "array"
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "type": {
                "const": "SVCB"
              }
            },
            "required": [
              "type"
            ]
          },
          "then": {
            "properties": {
              "value": {
                "properties": {
                  "svcparams": {
                    "additionalProperties": true,
                    "type": "object"
                  },
                  "svcpriority": {
                    "maximum": 65535,
                    "minimum": 0,
                    "type": "integer"
                  },
                  "targetname": {
                    "type": "string"
                  }
                },
                "required": [
                  "svcpriority",
                  "targetname"
                ],
                "type": "object"
              },
              "values": {
                "items": {
                  "properties": {
                    "svcparams": {
                      "additionalProperties": true,
                      "type": "object"
                    },
                    "svcpriority": {
                      "maximum": 65535,
                      "minimum": 0,
                      "type": "integer"
                    },
                    "targetname": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "svcpriority",
                    "targetname"
                  ],
                  "type": "object"
                },
                "minItems": 1,
                "type": "array"
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "type": {
                "const": "TLSA"
              }
            },
            "required": [
              "type"
            ]
          },
          "then": {
            "properties": {
              "value": {
                "properties": {
                  "certificate_association_data": {
                    "type": "string"
                  },
                  "certificate_usage": {
                    "maximum": 3,
                    "minimum": 0,
                    "type": "integer"
                  },
                  "matching_type": {
                    "maximum": 2,
                    "minimum": 0,
                    "type": "integer"
                  },
                  "selector": {
                    "maximum": 1,
                    "minimum": 0,
                    "type": "integer"
                  }
                },
                "required": [
                  "certificate_usage",
                  "selector",
                  "matching_type",
                  "certificate_association_data"
                ],
                "type": "object"
              },
              "values": {
                "items": {
                  "properties": {
                    "certificate_association_data": {
                      "type": "string"
                    },
                    "certificate_usage": {
                      "maximum": 3,
                      "minimum": 0,
                      "type": "integer"
                    },
                    "matching_type": {
                      "maximum": 2,
                      "minimum": 0,
                      "type": "integer"
                    },
                    "selector": {
                      "maximum": 1,
                      "minimum": 0,
                      "type": "integer"
                    }
                  },
                  "required": [
                    "certificate_usage",
                    "selector",
                    "matching_type",
                    "certificate_association_data"
                  ],
                  "type": "object"
                },
                "minItems": 1,
                "type": "array"
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "type": {
                "const": "TXT"
              }
            },
            "required": [
              "type"
            ]
          },
          "then": {
            "properties": {
              "value": {
                "type": "string"
              },
              "values": {
                "items": {
                  "type": "string"
                },
                "minItems": 1,
                "type": "array"
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "type": {
                "const": "URI"
              }
            },
            "required": [
              "type"
            ]
          },
          "then": {
            "properties": {
              "value": {
                "properties": {
                  "priority": {
                    "maximum": 65535,
                    "minimum": 0,
                    "type": "integer"
                  },
                  "target": {
                    "type": "string"
                  },
                  "weight": {
                    "maximum": 65535,
                    "minimum": 0,
                    "type": "integer"
                  }
                },
                "required": [
                  "priority",
                  "weight",
                  "target"
                ],
                "type": "object"
              },
              "values": {
                "items": {
                  "properties": {
                    "priority": {
                      "maximum": 65535,
                      "minimum": 0,
                      "type": "integer"
                    },
                    "target": {
                      "type": "string"
                    },
                    "weight": {
                      "maximum": 65535,
                      "minimum": 0,
                      "type": "integer"
                    }
                  },
                  "required": [
                    "priority",
                    "weight",
                    "target"
                  ],
                  "type": "object"
                },
                "minItems": 1,
                "type": "array"
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "type": {
                "const": "URLFWD"
              }
            },
            "required": [
              "type"
            ]
          },
          "then": {
            "properties": {
              "value": {
                "properties": {
                  "code": {
                    "enum": [
                      301,
                      302
                    ],
                    "type": "integer"
                  },
                  "masking": {
                    "enum": [
                      0,
                      1,
                      2
                    ],
                    "type": "integer"
                  },
                  "path": {
                    "type": "string"
                  },
                  "query": {
                    "enum": [
                      0,
                      1
                    ],
                    "type": "integer"
                  },
                  "target": {
                    "type": "string"
                  }
                },
                "required": [
                  "path",
                  "target",
                  "code",
                  "masking",
                  "query"
                ],
                "type": "object"
              },
              "values": {
                "items": {
                  "properties": {
                    "code": {
                      "enum": [
                        301,
                        302
                      ],
                      "type": "integer"
                    },
                    "masking": {
                      "enum": [
                        0,
                        1,
                        2
                      ],
                      "type": "integer"
                    },
                    "path": {
                      "type": "string"
                    },
                    "query": {
                      "enum": [
                        0,
                        1
                      ],
                      "type": "integer"
                    },
                    "target": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "path",
                    "target",
                    "code",
                    "masking",
                    "query"
                  ],
                  "type": "object"
                },
                "minItems": 1,
                "type": "array"
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "type": {
                "pattern": "^[A-Za-z_]\\w*(?:\\.[A-Za-z_]\\w*)*/[A-Za-z_]\\w*$"
              }
            },
            "required": [
              "type"
            ]
          },
          "then": {
            "properties": {
              "dynamic": true,
              "geo": true,
              "value": true,
              "values": true
            }
          }
        }
      ],
      "properties": {
        "octodns": {
          "$ref": "#/$defs/octodns_meta"
        },
        "ttl": {
          "minimum": 0,
          "type": "integer"
        },
        "type": {
          "anyOf": [
            {
              "enum": [
                "A",
                "AAAA",
                "ALIAS",
                "CAA",
                "CNAME",
                "DNAME",
                "DS",
                "HTTPS",
                "LOC",
                "MX",
                "NAPTR",
                "NS",
                "OPENPGPKEY",
                "PTR",
                "SPF",
                "SRV",
                "SSHFP",
                "SVCB",
                "TLSA",
                "TXT",
                "URI",
                "URLFWD"
              ]
            },
            {
              "pattern": "^[A-Za-z_]\\w*(?:\\.[A-Za-z_]\\w*)*/[A-Za-z_]\\w*$"
            }
          ],
          "type": "string"
        }
      },
      "required": [
        "type"
      ],
      "type": "object",
      "unevaluatedProperties": false
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": {
    "oneOf": [
      {
        "$ref": "#/$defs/record"
      },
      {
        "items": {
          "$ref": "#/$defs/record"
        },
        "minItems": 1,
        "type": "array"
      }
    ]
  },
  "description": "Schema for an octoDNS zone YAML file: a mapping of record names to a record or list of records.",
  "propertyNames": {
    "if": {
      "type": "string"
    },
    "then": {
      "allOf": [
        {
          "not": {
            "const": "@"
          }
        },
        {
          "not": {
            "pattern": "\\.\\."
          }
        },
        {
          "not": {
            "pattern": "\\.$"
          }
        },
        {
          "not": {
            "pattern": "[^.]{64}"
          }
        }
      ]
    }
  },
  "title": "octoDNS zone file",
  "type": "object"
}
