forked from loafle/openapi-generator-original
If the list is empty you get the ArgumentOutOfRangeException when calling flattenString.Remove(flattenString.Length - 1). Also using a StringBuilder is the prefered way to concatenate strings in a loop.