{ "$id": "https://nicsys.eu/wssGW-config.schema.json", "title": "wssGW Configuration", "description": "wssGateway is one of the components od Myeic's bus.", "type": "object", "properties": { "serviceName": { "type": "string" }, "accessRights": { "type": "array", "items": { "type": "object", "properties": { "roles": { "type": [ "string", "array" ], "items": { "type": "string" } }, "canPublish": { "type": "array", "items": { "type": "string" } }, "canSubscribe": { "type": "array", "items": { "type": "string" } }, "mustSubscribe": { "type": "array", "items": { "type": "string" } }, "canGet": { "type": "array", "items": { "type": "string" } }, "canSet": { "type": "array", "items": { "type": "string" } }, "canDo": { "type": "array", "items": { "type": "string" } } }, "required": [ "roles", "canPublish", "canSubscribe", "mustSubscribe" ] } }, "redis":{ "type": "array", "items": { "type": "object", "properties": { "redisId": {"type": "string" }, "role": {"type": "string", "enum": ["primary", "shard"] }, "host": { "type": "string" }, "tls": { "type": "boolean" }, "port": { "type": "integer" }, "user": { "type": "string" }, "pass": { "type": "string" }, "chansFilter": { "type": "string" }, "basePrefix": { "type": "string" }, "historizeMax": { "type": "integer" }, "historizePrefix": { "type": "string" }, "storeMaxSize": { "type": "integer" }, "storePrefix": { "type": "string" }, "historizeChannels": { "type": "array", "items": { "type": "string" } } }, "required": [ "redisId", "chansFilter", "role", "basePrefix", "storeMaxSize", "storePrefix" ], "if": { "properties": { "role": { "const": "primary" } } }, "then": { "required": ["historizeChannels", "historizeMax", "historizePrefix"] } } }, "server": { "type": "object", "properties": { "certFile": { "type": "string" }, "certKeyFile": { "type": "string" }, "listenHost": { "type": "string" }, "listenPort": { "type": ["integer","null"] }, "listenPath": { "type": "string" }, "unsecure": { "type": "boolean" }, "challengeExpiration": { "type": "integer" }, "keepAliveInterval": { "type": "string" }, "keepAliveTimeout": { "type": "string" } }, "required": [ "challengeExpiration", "keepAliveInterval", "keepAliveTimeout", "listenHost", "listenPath", "listenPort", "unsecure" ], "if": { "properties": { "unsecure": { "const": "false" } } }, "then": { "required": [ "certFile", "certKeyFile" ] } } }, "required": [ "serviceName", "accessRights", "redis", "server" ] }