logstash/docs/plugin-synopsis.html.erb
Greg Mefford ffe8166288 json_lines codec documentation is special since it isn't used with the file input.
Also fixed formatting issues with the config examples in the synopsis section.
2014-03-06 00:22:02 -05:00

24 lines
781 B
Text

<%= name %> {
<% sorted_attributes.each do |name, config|
next if config[:deprecated]
if config[:validate].is_a?(Array)
annotation = "string, one of #{config[:validate].inspect}"
elsif config[:validate] == :path
annotation = "a valid filesystem path"
else
annotation = "#{config[:validate]}"
end
if name.is_a?(Regexp)
name = "/" + name.to_s.gsub(/^\(\?-mix:/, "").gsub(/\)$/, "") + "/"
end
if config[:required]
annotation += " (required)"
else
annotation += " (optional)"
end
annotation += ", default: #{config[:default].inspect}" if config.include?(:default)
-%>
<%= " " if section == "codec" %> <a href="#<%= name %>"><%= name %></a> => ... # <%= annotation %>
<% end -%>
<%= " " if section == "codec" %> }