protodef
Version:
A simple yet powerful way to define binary protocols
44 lines (43 loc) • 861 B
JSON
{
"title": "protocol",
"type": "object",
"properties": {
"types": {
"type": "object",
"patternProperties": {
"^[0-9a-zA-Z_]+$": {
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": [
{
"type": "string"
},
{
"oneOf": [
{
"type": "object"
},
{
"type": "array"
}
]
}
]
}
]
}
},
"additionalProperties": false
}
},
"patternProperties": {
"^(?!types)[a-zA-Z_]+$": {
"$ref": "#"
}
},
"additionalProperties": false
}