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,29 @@
{
"$id": "https://nfsense.net/schema/object/address.schema.json",
"title": "Address",
"type": "object",
"properties": {
"type": {
"type": "string"
},
"comment": {
"type": "string"
},
"host": {
"type": "string"
},
"range": {
"type": "string"
},
"network": {
"type": "string"
},
"children": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": ["type"]
}

View file

@ -0,0 +1,20 @@
{
"$id": "https://nfsense.net/schema/object/object.schema.json",
"title": "Object",
"type": "object",
"properties": {
"addresses": {
"type": "object",
"additionalProperties": {
"$ref": "https://nfsense.net/schema/object/address.schema.json"
}
},
"services": {
"type": "object",
"additionalProperties": {
"$ref": "https://nfsense.net/schema/object/service.schema.json"
}
}
},
"required": ["addresses", "services"]
}

View file

@ -0,0 +1,35 @@
{
"$id": "https://nfsense.net/schema/object/service.schema.json",
"title": "Service",
"type": "object",
"properties": {
"type": {
"type": "string"
},
"comment": {
"type": "string"
},
"sport_start": {
"type": "number"
},
"sport_end": {
"type": "number"
},
"dport_start": {
"type": "number"
},
"dport_end": {
"type": "number"
},
"icmp_code": {
"type": "number"
},
"children": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": ["type"]
}