{ "$schema": "http://json-schema.org/draft-07/schema#", "$id": "roles", "definitions": { "admin": { "type": "object", "required": ["scope", "roles"], "properties": { "scope": { "type": "array", "contains": { "type": "string", "pattern": "^user$" } }, "roles": { "type": "array", "contains": { "type": "string", "pattern": "^admin$" } } } }, "user": { "type": "object", "required": ["scope"], "properties": { "scope": { "type": "array", "contains": { "type": "string", "pattern": "^user$" } } } } } }