mirror of
https://github.com/speatzle/nfsense.git
synced 2025-09-13 15:19:08 +00:00
add basic schema with all properties
This commit is contained in:
parent
5483f7f39d
commit
8b23444815
26 changed files with 560 additions and 57 deletions
11
internal/validation/schema/vpn/vpn.schema.json
Normal file
11
internal/validation/schema/vpn/vpn.schema.json
Normal 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"]
|
||||
}
|
22
internal/validation/schema/vpn/wireguard.schema.json
Normal file
22
internal/validation/schema/vpn/wireguard.schema.json
Normal 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"]
|
||||
}
|
|
@ -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"]
|
||||
}
|
29
internal/validation/schema/vpn/wireguard_peer.schema.json
Normal file
29
internal/validation/schema/vpn/wireguard_peer.schema.json
Normal 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"]
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue