Skip to content

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

Closed

Description

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=".

Activity

  1. added this to the 1.3 milestone on Jul 2, 2020
  2. darrelmiller commented on Jul 2, 2020

    @darrelmiller
    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.

  3. added a commit that references this issue on Aug 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:bugA broken experience

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions