{"title": "FutoIn interface definition schema", "type": "object", "required": ["iface", "version", "ftn3rev"], "additionalProperties": false, "properties": {"iface": {"type": "string", "pattern": "^([a-z][a-z0-9]*)(\\.[a-z][a-z0-9]*)+$", "description": "Unique interface identifier"}, "version": {"type": "string", "pattern": "^[0-9]+\\.[0-9]+$", "description": "Version of the given interface"}, "ftn3rev": {"type": "string", "pattern": "^[0-9]+\\.[0-9]+$", "description": "Version of the FTN3 spec, according to which the iface is defined"}, "types": {"type": "object", "description": "iface types. Must start with Capital", "patternProperties": {"^[A-Z][a-zA-Z0-9]*$": {"type": "object", "additionalProperties": false, "properties": {"type": {"type": "string", "pattern": "^any|boolean|integer|number|string|map|array|[A-Z][a-zA-Z0-9]+$"}, "min": {"type": "number"}, "max": {"type": "number"}, "minlen": {"type": "number"}, "maxlen": {"type": "number"}, "regex": {"type": "string"}, "elemtype": {"type": "string"}, "fields": {"type": "object", "additionalProperties": false, "properties": {"type": {"type": "string", "pattern": "^any|boolean|integer|number|string|map|array|[A-Z][a-zA-Z0-9]+$"}, "optional": {"type": "boolean", "description": "If true the field is optional. Defaults to null"}, "desc": {"type": "string", "description": "Result variable description"}}}, "desc": {"type": "string", "description": "Custom type description"}}}}}, "funcs": {"type": "object", "description": "Member function declaration", "additionalProperties": false, "patternProperties": {"^[a-z][a-zA-Z0-9]*$": {"type": "object", "additionalProperties": false, "properties": {"params": {"additionalProperties": false, "patternProperties": {"^[a-z][a-z0-9_]*$": {"type": "object", "properties": {"type": {"type": "string", "pattern": "^any|boolean|integer|number|string|map|array|[A-Z][a-zA-Z0-9]+$"}, "default": {"type": ["boolean", "integer", "number", "string", "object", "array", "null"]}, "desc": {"type": "string", "description": "Parameter description"}}}}, "description": "List of allowed parameter key-value pairs"}, "result": {"additionalProperties": false, "patternProperties": {"^[a-z][a-z0-9_]*$": {"type": "object", "properties": {"type": {"type": "string", "pattern": "^any|boolean|integer|number|string|map|array|[A-Z][a-zA-Z0-9]+$"}, "desc": {"type": "string", "description": "Result variable description"}}}}, "description": "List of allowed result key-value pairs"}, "rawupload": {"type": "boolean", "desc": "If not set then arbitrary data upload is not allowed."}, "rawresult": {"type": "boolean", "desc": "If set then no FutoIn response is assumed. Arbitrary raw data is sent instead."}, "throws": {"type": "array", "uniqueItems": true, "description": "List of associative error names, which can be triggered by function execution"}, "heavy": {"type": "boolean", "desc": "Mark request as \"heavy\" in terms processing"}, "desc": {"type": "string", "description": "Interface Function description"}}, "description": "Interface Function declaration"}}}, "desc": {"type": "string", "description": "Description of the interface"}, "inherit": {"type": "string", "description": "Name:version of interface to be inherited"}, "imports": {"type": "array", "uniqueItems": true, "description": "Name:version of interface to be imported as a mixin"}, "requires": {"type": "array", "description": "List of conditions for interface operation", "items": {"type": "string", "pattern": "^AllowAnonymous|SecureChannel|BiDirectChannel|[a-zA-Z0-9]+$"}, "uniqueItems": true}}}