register/schema.json
2024-10-25 22:28:00 +07:00

92 lines
1.9 KiB
JSON

{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"owner": {
"type": "object",
"properties": {
"username": {
"type": "string"
}
},
"required": ["username"],
"additionalProperties": {
"type": "string"
}
},
"record": {
"type": "object",
"properties": {
"ALIAS": {
"type": "string"
},
"A": {
"type": "array",
"items": {
"type": "string",
"format": "ipv4"
}
},
"AAAA": {
"type": "array",
"items": {
"type": "string",
"format": "ipv6"
}
},
"CNAME": {
"type": "string"
},
"MX": {
"type": "array",
"items": {
"type": "string"
}
},
"TXT": {
"type": "array",
"items": {
"type": "string"
}
},
"SRV": {
"type": "array",
"items": {
"type": "object",
"properties": {
"priority": {
"type": "integer"
},
"weight": {
"type": "integer"
},
"port": {
"type": "integer"
},
"target": {
"type": "string"
}
},
"required": ["priority", "weight", "port", "target"]
}
}
},
"required": [],
"anyOf": [
{ "required": ["A"] },
{ "required": ["AAAA"] },
{ "required": ["CNAME"] },
{ "required": ["MX"] },
{ "required": ["TXT"] },
{ "required": ["SRV"] }
]
},
"proxied": {
"type": "boolean"
}
},
"required": ["owner", "record"]
}