mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 14:47:19 -04:00
24 lines
781 B
Text
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" %> }
|