{ "$schema":"http://json-schema.org/draft-07/schema", "definitions":{ "group_property":{ "type":"object", "title":"Group property object", "description":"Assigns wrapped property to group.", "if":{ "properties":{ "property":{ "const":"get" } } }, "then":{ "properties":{ "group":{ "type":"string" }, "property":{ "const":"get" }, "criteria":{ "$ref":"#/definitions/criteria" } }, "additionalProperties":false }, "else":{ "properties":{ "group":{ "type":"string" }, "property":{ "const":"set" }, "criteria":{ "$ref":"#/definitions/criteria" }, "arguments":{ "oneOf":[ { "type":"array" }, { "type":"string" } ] } }, "additionalProperties":false }, "required":[ "group" ] }, "group_function":{ "type":"object", "title":"Group function object", "description":"Assigns wrapped function to group.", "properties":{ "group":{ "type":"string" }, "criteria":{ "$ref":"#/definitions/criteria" }, "arguments":{ "oneOf":[ { "type":"array" }, { "type":"string" } ] } }, "required":[ "group" ], "additionalProperties":false }, "criteria":{ "type":"array", "title":"Criteria array", "description":"Contains criterion objects to define parent group access/weight.", "items":{ "$ref":"#/definitions/criterion_value" } }, "criterion_value":{ "type":"object", "title":"Value criterion", "description":"Criterion defined as number of accesses to resource.", "properties":{ "value":{ "type":"integer", "minimum":1, "maximum":1000 }, "weight":{ "type":"integer", "minimum":0 } }, "required":[ "value", "weight" ], "additionalProperties":false } }, "type":"array", "items":{ "type":"object", "title":"Wrapper object", "description":"Represents wrapped resource.", "if":{ "properties":{ "type":{ "const":"property" } } }, "then":{ "properties":{ "resource":{ "type":"string" }, "type":{ "const":"property" }, "groups":{ "type":"array", "items":{ "$ref":"#/definitions/group_property" } } }, "additionalProperties":false }, "else":{ "properties":{ "resource":{ "type":"string" }, "type":{ "const":"function" }, "groups":{ "type":"array", "items":{ "$ref":"#/definitions/group_function" } } }, "additionalProperties":false }, "required":[ "resource", "type" ] } }