Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenApiTextReaderReader inconsistently sets "#char=" vs. "#line=" in OpenApiError.Pointer #495

Closed
KalleOlaviNiemitalo opened this issue Jun 25, 2020 · 1 comment
Labels
type:bug A broken experience
Milestone

Comments

@KalleOlaviNiemitalo
Copy link

When OpenApiTextReaderReader translates a YamlException to OpenApiError, it sets "#line=" followed by a line number as OpenApiError.Pointer:

diagnostic.Errors.Add(new OpenApiError($"#line={ex.Start.Line}", ex.Message));

Here though, it instead sets "#char=" followed by a line number as OpenApiError.Pointer:

diagnostic.Errors.Add(new OpenApiError($"#char={ex.Start.Line}", ex.Message));

Because there is a line number in both cases, I think "#line=" would be more appropriate than "#char=".

@darrelmiller
Copy link
Member

Thank you for raising this issue. I agree that this is a mistake. I suspect that may be a result of a bad merge.

@darrelmiller darrelmiller added the type:bug A broken experience label Jul 2, 2020
@darrelmiller darrelmiller modified the milestones: 1.3, 1.2.3 Aug 17, 2020
darrelmiller added a commit that referenced this issue Aug 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug A broken experience
Projects
None yet
Development

No branches or pull requests

2 participants