# File lib/grape/validations/params_scope.rb, line 71 def full_name(name, index: nil) if nested? # Find our containing element's name, and append ours. [@parent.full_name(@element), [@index || index, name].map(&method(:brackets))].compact.join elsif lateral? # Find the name of the element as if it was at the same nesting level # as our parent. We need to forward our index upward to achieve this. @parent.full_name(name, index: @index) else # We must be the root scope, so no prefix needed. name.to_s end end