Copy the line number to OpenApiError.Pointer if known
Some methods in Microsoft.OpenApi.Readers throw an OpenApiException whose Exception.Message includes a line number. I would like to have all of these line numbers available in OpenApiError.Pointer, to make them easier to parse automatically.
https://github.com/microsoft/OpenAPI.NET/blob/be6a700805710a86fcb73bbcbffaec6f571ba4b9/src/Microsoft.OpenApi.Readers/ParseNodes/ListNode.cs#L30-L31 https://github.com/microsoft/OpenAPI.NET/blob/be6a700805710a86fcb73bbcbffaec6f571ba4b9/src/Microsoft.OpenApi.Readers/ParseNodes/ListNode.cs#L50-L51 https://github.com/microsoft/OpenAPI.NET/blob/be6a700805710a86fcb73bbcbffaec6f571ba4b9/src/Microsoft.OpenApi.Readers/ParseNodes/MapNode.cs#L66 https://github.com/microsoft/OpenAPI.NET/blob/be6a700805710a86fcb73bbcbffaec6f571ba4b9/src/Microsoft.OpenApi.Readers/ParseNodes/MapNode.cs#L88 https://github.com/microsoft/OpenAPI.NET/blob/be6a700805710a86fcb73bbcbffaec6f571ba4b9/src/Microsoft.OpenApi.Readers/ParseNodes/MapNode.cs#L123 https://github.com/microsoft/OpenAPI.NET/blob/be6a700805710a86fcb73bbcbffaec6f571ba4b9/src/Microsoft.OpenApi.Readers/ParseNodes/MapNode.cs#L178 https://github.com/microsoft/OpenAPI.NET/blob/be6a700805710a86fcb73bbcbffaec6f571ba4b9/src/Microsoft.OpenApi.Readers/YamlHelper.cs#L18
This indeed would be very helpful!
In addition, it would be nice if the diagnostic object supported error levels like "Warning", "Error". This would allow a better distinction for exceptions that can be actively ignored in processing.
Furthermore, it would be very helpful if the errors were categorized or numbered. Then they could be processed more easily instead of having to parse the strings.