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,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"]
}

View 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"]
}

View 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"]
}