mirror of
https://github.com/speatzle/nfsense.git
synced 2025-09-13 23:29: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
|
@ -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"
|
||||
}
|
||||
}
|
||||
}
|
26
internal/validation/schema/firewall/firewall.schema.json
Normal file
26
internal/validation/schema/firewall/firewall.schema.json
Normal 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"]
|
||||
}
|
12
internal/validation/schema/firewall/forward_rule.schema.json
Normal file
12
internal/validation/schema/firewall/forward_rule.schema.json
Normal 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"]
|
||||
}
|
25
internal/validation/schema/firewall/match.schema.json
Normal file
25
internal/validation/schema/firewall/match.schema.json
Normal 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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
20
internal/validation/schema/firewall/rule.schema.json
Normal file
20
internal/validation/schema/firewall/rule.schema.json
Normal 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"]
|
||||
}
|
|
@ -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"
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue