UNPKG

protodef

Version:

A simple yet powerful way to define binary protocols

29 lines (28 loc) 641 B
{ "$schema": "http://json-schema.org/draft-04/schema#", "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 }