parser-js
parser-js copied to clipboard
Dereference error does not include "title"
Describe the bug
The dereferencing parser is not returning definition.refs.title, which is expected per ParserError.
How to Reproduce
- Go to https://studio.asyncapi.com/
- Introduce two
$referrors as seen in screenshot, e.g. line 32 and line 39. - Expand the
Problemspane

Expected behavior
A clear and concise description of what you expected to happen.
In the screenshot, one can see that the title referencing line 39 is incorrect. It should be Token "lightmeasured3" does not exist.
This visual error is because definition.title is being used instead of definition.refs[].title, but more importantly is that I can observe that definition.refs[].title itself doesn't exist as an output of the parser.
Welcome to AsyncAPI. Thanks a lot for reporting your first issue. Please check out our contributors guide and the instructions about a basic recommended setup useful for opening a pull request.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.
Hey thanks for reporting that bug. I could reproduce the error. I think, using the correct error index, will resolve the following issue.
https://github.com/asyncapi/parser-js/blob/c962a7e7278f5fc8652621d8881032fceaa79a28/lib/parser.js#L162
This issue has been automatically marked as stale because it has not had recent activity :sleeping:
It will be closed in 120 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation.
There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model.
Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here.
Thank you for your patience :heart:
It is resolved in the https://github.com/asyncapi/studio/pull/434