KaiZen-OpenApi-Parser icon indicating copy to clipboard operation
KaiZen-OpenApi-Parser copied to clipboard

Accessing start position for a path returns unexpected line number

Open KevinMitchell opened this issue 4 years ago • 0 comments

I want to be able to extract accurate start positions for various parts of a specification. As an example, from the model I can extract all the Path objects, and from an individual path I can get an overlay instance, using Overlay.of(path), and from that I can get the PositionInfo instance. But the start line for the position info returns the start of the contents of the path. E.g. the line containing the first non-blank entry such as a get: within the path. It doesn't return the line with the path itself. Is this expected? And should I be following a different sequence of calls to obtain the "real" start-line/column for the path. I can try working "backwards" from what the position info returns to get the real values, but before writing such a hack I wanted to make sure I just hadn't misunderstood how I'm supposed to use the overlays/position infos.

Thanks.

KevinMitchell avatar Jan 25 '21 11:01 KevinMitchell