add basic schema with all properties

This commit is contained in:
Samuel Lorch 2023-10-10 19:57:04 +02:00
parent 5483f7f39d
commit 8b23444815
26 changed files with 560 additions and 57 deletions

View file

@ -0,0 +1,11 @@
{
"$id": "https://nfsense.net/schema/vpn/vpn.schema.json",
"title": "VPN",
"type": "object",
"properties": {
"wireguard": {
"$ref": "https://nfsense.net/schema/vpn/wireguard.schema.json"
}
},
"required": ["wireguard"]
}

View file

@ -0,0 +1,22 @@
{
"$id": "https://nfsense.net/schema/vpn/wireguard.schema.json",
"title": "Wireguard",
"type": "object",
"properties": {
"interfaces": {
"type": "object",
"additionalProperties": {
"description": "Wireguard Interface",
"$ref": "https://nfsense.net/schema/vpn/wireguard_interface.schema.json"
}
},
"peers": {
"type": "object",
"additionalProperties": {
"description": "Wireguard Peer",
"$ref": "https://nfsense.net/schema/vpn/wireguard_peer.schema.json"
}
}
},
"required": ["interfaces", "peers"]
}

View file

@ -0,0 +1,26 @@
{
"$id": "https://nfsense.net/schema/vpn/wireguard_interface.schema.json",
"title": "Wireguard Interface",
"type": "object",
"properties": {
"public_key": {
"type": "string"
},
"private_key": {
"type": "string"
},
"listen_port": {
"type": "number"
},
"peers": {
"type": "array",
"items": {
"type": "string"
}
},
"comment": {
"type": "string"
}
},
"required": ["public_key", "private_key", "listen_port", "peers"]
}

View file

@ -0,0 +1,29 @@
{
"$id": "https://nfsense.net/schema/vpn/wireguard_peer.schema.json",
"title": "Wireguard Peer",
"type": "object",
"properties": {
"public_key": {
"type": "string"
},
"preshared_key": {
"type": ["string", "null"]
},
"allowed_ips": {
"type": "array",
"items": {
"type": "string"
}
},
"endpoint": {
"type": ["string", "null"]
},
"persistent_keepalive": {
"type": ["number", "null"]
},
"comment": {
"type": "string"
}
},
"required": ["public_key", "allowed_ips"]
}