{"type": "object", "$schema": "http://json-schema.org/draft-07/schema#", "required": ["name", "code", "states"], "x-unique": ["code"], "properties": {"code": {"type": "string"}, "name": {"type": "string", "pattern": "^[A-Za-z]+$"}, "active": {"type": "boolean"}, "states": {"type": "array", "items": {"type": "object", "required": ["actions"], "properties": {"actions": {"type": "array", "items": {"type": "object", "required": ["roles"], "properties": {"roles": {"type": "array", "items": {"type": "string"}}}}}}}}}, "x-ref-schema": [{"fieldPath": "states.*.actions.*.roles.*", "schemaCode": "TradeLicense.TradeType"}]}