diff --git a/src/Microsoft.OpenApi.Readers/ParseNodes/ListNode.cs b/src/Microsoft.OpenApi.Readers/ParseNodes/ListNode.cs index bfb9a554f..3ea1dd651 100644 --- a/src/Microsoft.OpenApi.Readers/ParseNodes/ListNode.cs +++ b/src/Microsoft.OpenApi.Readers/ParseNodes/ListNode.cs @@ -25,8 +25,7 @@ public override List CreateList(Func map) { if (_nodeList == null) { - throw new OpenApiReaderException( - $"Expected list at line {_nodeList.Start.Line} while parsing {typeof(T).Name}", _nodeList); + throw new OpenApiReaderException($"Expected list while parsing {typeof(T).Name}"); } return _nodeList.Select(n => map(new(Context, n as YamlMappingNode)))