If setting returnRoutes=true in the response if the "NAServer/Route" operation only one Line Geometry comes back for the whole route, even though the returned JSON object is a Polyline. In other words: We get an array of lines that always contains only one line.
I'm suggesting that this should be separated into sections between stops (or the directions segments as uncompressed geometry) by the NAServer.
Use case for this is that only a section between two stops is supposed to be drawn. If you want to do that with the JS API, you currently need to iterate through the segments (in
routeResultsresult routeResults directions) while looking for the "esriDMTDepart" direction where the section starts and "esriDMTStop" where it ends, then decode the compressedGeometries, combine all segments from one stop to the next and draw the line. It's possible but ugly, from a development point of view.