microsoft / OpenAPI.NET

The OpenAPI.NET SDK contains a useful object model for OpenAPI documents in .NET along with common serializers to extract raw OpenAPI JSON and YAML documents from the model.
MIT License
1.41k stars 232 forks source link

Document the syntax of OpenApiError.Pointer #500

Closed KalleOlaviNiemitalo closed 3 years ago

KalleOlaviNiemitalo commented 4 years ago

The OpenApiError.Pointer property currently has a minimal XML documentation comment:

https://github.com/microsoft/OpenAPI.NET/blob/be6a700805710a86fcb73bbcbffaec6f571ba4b9/src/Microsoft.OpenApi/Models/OpenApiError.cs#L34-L37

I would like to see documentation of the possible syntaxes here. I have an MSBuild task that tries to parse this string and pass line and column numbers to TaskLoggingHelper.LogError.

Currently, the possibilities seem to be:

(Some errors have more detailed location information in OpenApiError.Message. Filed https://github.com/microsoft/OpenAPI.NET/issues/502 for making that easier to access.)

KalleOlaviNiemitalo commented 4 years ago

Verified that OpenApiError.Pointer in Microsoft.OpenApi.Readers 1.2.2 does not escape / as ~1 if the error occurs within a Path Item Object, whose key in the Paths Object always starts with a slash.