added json-schema for config/dns.json

This commit is contained in:
psyirius 2024-08-07 06:27:05 -07:00
parent da824d58a7
commit 4d7e6ded11
2 changed files with 29 additions and 0 deletions

View File

@ -1,4 +1,5 @@
{
"$schema": "../schemas/config/dns.json",
"Google":{
"Primary": "8.8.8.8",
"Secondary": "8.8.4.4",

28
schemas/config/dns.json Normal file
View File

@ -0,0 +1,28 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"patternProperties": {
"^[a-zA-Z_][a-zA-Z0-9_]*$": {
"type": "object",
"properties": {
"Primary": {
"type": "string",
"format": "ipv4"
},
"Secondary": {
"type": "string",
"format": "ipv4"
},
"Primary6": {
"type": "string",
"format": "ipv6"
},
"Secondary6": {
"type": "string",
"format": "ipv6"
}
},
"required": ["Primary", "Secondary", "Primary6", "Secondary6"]
}
}
}