class BiDiGenerate::Schema

def guard_union_dispatch_keys_simple!(selector, ref)

camelCase so the outbound dispatch gets an explicit wire<->ruby mapping then.
Every current key is a single lowercase word; fail generation if a new one is
symbol, which holds only while each dispatch wire key equals its ruby kwarg.
`Union.build` matches the command's kwargs to the selector's dispatch keys by
def guard_union_dispatch_keys_simple!(selector, ref)
  keys = selector['by'] ? [selector['by']] : (selector['ordered'] || []).flat_map { |arm| arm['requires'] }
  camel = keys.reject { |k| BiDiGenerate.camel_to_snake(k) == k }
  return if camel.empty?
  raise "union command param #{ref} dispatches on non-snake wire key(s) #{camel.inspect}; " \
        'Union.build matches kwargs to dispatch keys by symbol, so give the outbound ' \
        'dispatch an explicit wire<->ruby mapping before shipping this.'
end