Generate correct route when :format segment is mandatory

Fixing https://github.com/enriclluelles/route_translator/issues/57