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
44
internal/validation/schema/network/interface.schema.json
Normal file
44
internal/validation/schema/network/interface.schema.json
Normal file
|
@ -0,0 +1,44 @@
|
|||
{
|
||||
"$id": "https://nfsense.net/schema/network/interface.schema.json",
|
||||
"title": "Interface",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"alias": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"type": "string"
|
||||
},
|
||||
"addressing_mode": {
|
||||
"type": "string"
|
||||
},
|
||||
"address": {
|
||||
"type": "string"
|
||||
},
|
||||
"hardware_device": {
|
||||
"type": "string"
|
||||
},
|
||||
"vlan_id": {
|
||||
"type": "number"
|
||||
},
|
||||
"vlan_parent": {
|
||||
"type": "string"
|
||||
},
|
||||
"bond_members": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"bridge_members": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"comment": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": ["type", "addressing_mode"]
|
||||
}
|
20
internal/validation/schema/network/network.schema.json
Normal file
20
internal/validation/schema/network/network.schema.json
Normal file
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
"$id": "https://nfsense.net/schema/network/network.schema.json",
|
||||
"title": "Network",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"interfaces": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"$ref": "https://nfsense.net/schema/network/interface.schema.json"
|
||||
}
|
||||
},
|
||||
"static_routes": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "https://nfsense.net/schema/network/static_route.schema.json"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": ["interfaces"]
|
||||
}
|
23
internal/validation/schema/network/static_route.schema.json
Normal file
23
internal/validation/schema/network/static_route.schema.json
Normal file
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
"$id": "https://nfsense.net/schema/network/static_route.schema.json",
|
||||
"title": "Static Route",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"interface": {
|
||||
"type": "string"
|
||||
},
|
||||
"gateway": {
|
||||
"type": "string"
|
||||
},
|
||||
"destination": {
|
||||
"type": "string"
|
||||
},
|
||||
"metric": {
|
||||
"type": "number"
|
||||
}
|
||||
},
|
||||
"required": ["name", "interface", "gateway", "destination"]
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue