if not opts['short'] then
if value['data'] then
- local nv = string.match(value['data'], '^#%s*(.*)%s*$') or value.data
- print(string.format('%s\tDescription: %s', tabs, nv))
+ local data = value['data']
+ if type(data) == 'string' then
+ local nv = string.match(data, '^#%s*(.*)%s*$') or data
+ print(string.format('%s\tDescription: %s', tabs, nv))
+ elseif type(data) == 'table' and data.summary then
+ print(string.format('%s\tDescription: %s', tabs, data.summary))
+ end
end
if type(value['type']) == 'string' then
print(string.format('%s\tType: %s', tabs, value['type']))
symbol = T.string():optional():doc({ summary = "Symbol name" }),
}):doc({ summary = "Common rule fields" })
+-- Register rule_common as a mixin for documentation
+PluginSchema.register("mixins.external_relay_common", rule_common)
+
local config_schema = T.table({
enabled = T.boolean():optional():doc({ summary = "Enable the plugin" }),
rules = T.table({}, {