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,14 @@
{
"$id": "https://nfsense.net/schema/firewall/destination_nat_rule.schema.json",
"title": "Destination NAT Rule",
"$ref": "https://nfsense.net/schema/firewall/rule.schema.json",
"type": "object",
"properties": {
"address": {
"type": "string"
},
"service": {
"type": "string"
}
}
}

View file

@ -0,0 +1,26 @@
{
"$id": "https://nfsense.net/schema/firewall/firewall.schema.json",
"title": "Firewall",
"type": "object",
"properties": {
"forward_rules": {
"type": "array",
"items": {
"$ref": "https://nfsense.net/schema/firewall/forward_rule.schema.json"
}
},
"destination_nat_rules": {
"type": "array",
"items": {
"$ref": "https://nfsense.net/schema/firewall/destination_nat_rule.schema.json"
}
},
"source_nat_rules": {
"type": "array",
"items": {
"$ref": "https://nfsense.net/schema/firewall/source_nat_rule.schema.json"
}
}
},
"required": ["forward_rules", "destination_nat_rules", "source_nat_rules"]
}

View file

@ -0,0 +1,12 @@
{
"$id": "https://nfsense.net/schema/firewall/forward_rule.schema.json",
"title": "Forward Rule",
"$ref": "https://nfsense.net/schema/firewall/rule.schema.json",
"type": "object",
"properties": {
"verdict": {
"type": "string"
}
},
"required": ["verdict"]
}

View file

@ -0,0 +1,25 @@
{
"$id": "https://nfsense.net/schema/firewall/match.schema.json",
"title": "Match",
"type": "object",
"properties": {
"services": {
"type": "array",
"items": {
"type": "string"
}
},
"source_addresses": {
"type": "array",
"items": {
"type": "string"
}
},
"destination_addresses": {
"type": "array",
"items": {
"type": "string"
}
}
}
}

View file

@ -0,0 +1,20 @@
{
"$id": "https://nfsense.net/schema/firewall/rule.schema.json",
"title": "Rule",
"type": "object",
"properties": {
"name": {
"type": "string"
},
"match": {
"$ref": "https://nfsense.net/schema/firewall/match.schema.json"
},
"comment": {
"type": "string"
},
"counter": {
"type": "boolean"
}
},
"required": ["name", "match"]
}

View file

@ -0,0 +1,17 @@
{
"$id": "https://nfsense.net/schema/firewall/source_nat_rule.schema.json",
"title": "Source NAT Rule",
"$ref": "https://nfsense.net/schema/firewall/rule.schema.json",
"type": "object",
"properties": {
"type": {
"type": "string"
},
"address": {
"type": "string"
},
"service": {
"type": "string"
}
}
}