mirror of
https://github.com/speatzle/nfsense.git
synced 2025-09-13 15:19: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
29
internal/validation/schema/object/address.schema.json
Normal file
29
internal/validation/schema/object/address.schema.json
Normal 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"]
|
||||
}
|
20
internal/validation/schema/object/object.schema.json
Normal file
20
internal/validation/schema/object/object.schema.json
Normal 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"]
|
||||
}
|
35
internal/validation/schema/object/service.schema.json
Normal file
35
internal/validation/schema/object/service.schema.json
Normal 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"]
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue