mirror of https://codeberg.org/CRXN/entitydb.git
122 lines
4.9 KiB
JSON
122 lines
4.9 KiB
JSON
{
|
|
"$schema": "https://json-schema.org/draft-04/schema",
|
|
"type": "object",
|
|
"description": "You can check a entity with `check-jsonschema --schemafile schema.json entity.json`.",
|
|
"properties": {
|
|
"person": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"type": "string",
|
|
"pattern": "^.{1,64}$",
|
|
"description": "A name must be at least one character long and can be up to 64 characters long."
|
|
},
|
|
"email": {
|
|
"type": "string",
|
|
"format": "email"
|
|
},
|
|
"gpg": {
|
|
"type": "string",
|
|
"pattern": "^[\\dA-F]{40}$",
|
|
"description": "GPG fingerprints are stored here without a spaces."
|
|
}
|
|
},
|
|
"minProperties": 1
|
|
},
|
|
"route": {
|
|
"type": "object",
|
|
"patternProperties": {
|
|
"^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\\/((4[4-9])|(5[1-9])|(6[1-4]))$": {
|
|
"type": "object",
|
|
"properties": {
|
|
"description": {
|
|
"type": "string",
|
|
"pattern": "^.{1,2048}$"
|
|
},
|
|
"dns": {
|
|
"type": "object",
|
|
"properties": {
|
|
"nserver": {
|
|
"type": "string",
|
|
"format": "hostname"
|
|
},
|
|
"ds": {
|
|
"type": "string",
|
|
"pattern": "\\d{1,10} ([3-9]|1[0-6]) [1-4] [\\dA-F ]{40,384}"
|
|
}
|
|
},
|
|
"required": [
|
|
"nserver"
|
|
],
|
|
"additionalProperties": false
|
|
},
|
|
"max-len": {
|
|
"type": "string",
|
|
"pattern": "((4[4-9])|(5[1-9])|(6[1-4]))"
|
|
},
|
|
"device": {
|
|
"type": "object",
|
|
"patternProperties": {
|
|
"^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"pattern": "^(router|generic|server)$"
|
|
},
|
|
"description": {
|
|
"type": "string",
|
|
"pattern": "^.{1,2048}$"
|
|
},
|
|
"service": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"pattern": "^.{1,64}$"
|
|
},
|
|
"description": {
|
|
"type": "string",
|
|
"pattern": "^.{1,2048}$"
|
|
},
|
|
"endpoint": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"minProperties": 1
|
|
},
|
|
"minItems": 1,
|
|
"uniqueItems": true
|
|
},
|
|
"additionalProperties": false
|
|
}
|
|
},
|
|
"minItems": 1,
|
|
"uniqueItems": true
|
|
},
|
|
"additionalProperties": false
|
|
}
|
|
}
|
|
},
|
|
"minProperties": 1,
|
|
"additionalProperties": false
|
|
}
|
|
},
|
|
"required": [
|
|
"device"
|
|
],
|
|
"additionalProperties": false
|
|
}
|
|
},
|
|
"minProperties": 1,
|
|
"additionalProperties": false
|
|
}
|
|
},
|
|
"additionalProperties": true,
|
|
"required": [
|
|
"route"
|
|
]
|
|
}
|