You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If there is a typo in $ref value the parser should throw an error instead of passing the actual $ref.
How to Reproduce
constparser=require('@asyncapi/parser');parser.parse(`asyncapi: 2.0.0info: title: Streetlights API version: '1.0.0'channels: smartylighting/event/lighting/measured: subscribe: message: $ref: "#components/messages/message1"components: messages: message1: name: unusedMessage title: This is most definityly a message.`).then((doc)=>{console.log(doc.channel('smartylighting/event/lighting/measured').subscribe().message().json());});
Since we don't want errors to be thrown but rather bundled together, to throw one big error in the end (I would assume so? git blame @derberg@fmvilas), this option is set to true:
I'm now wondering if continueOnError actually does that
it does, it gives an array of all errors
continueOnError: true
it is just an option in refs parser library that we leverage. As you know, when I added custom validations, I did not follow this principle, as far as I remember, my bad. The same option to group errors is also used in Ajv.
hard to say why there is no error, would require some debugging
This issue has been automatically marked as stale because it has not had recent activity 😴
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.
This issue has been automatically marked as stale because it has not had recent activity 😴
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.
dunno, maybe there is already some super bullet-proof regex created by the community that can validate $ref as it can represent, link to file, URL or location inside the existing document. It definitely exceeds my knowledge of regex 😄
Activity
jonaslagoni commentedon Sep 9, 2021
Since we don't want errors to be thrown but rather bundled together, to throw one big error in the end (I would assume so? git blame @derberg @fmvilas), this option is set to true:
parser-js/lib/parser.js
Line 153 in 235efd5
However, we never check that the dereference succedded, not sure if the dereference call actually returns any content, docs say nothing.
fmvilas commentedon Sep 14, 2021
Yeah, the idea is that it continues to throw one big error at the end. I'm now wondering if
continueOnErroractually does that 🤔derberg commentedon Sep 14, 2021
it does, it gives an array of all errors
it is just an option in refs parser library that we leverage. As you know, when I added custom validations, I did not follow this principle, as far as I remember, my bad. The same option to group errors is also used in Ajv.
hard to say why there is no error, would require some debugging
github-actions commentedon Jan 13, 2022
This issue has been automatically marked as stale because it has not had recent activity 😴
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 ❤️
github-actions commentedon May 14, 2022
This issue has been automatically marked as stale because it has not had recent activity 😴
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 ❤️
smoya commentedon Jul 11, 2022
Can we solve this with a
patternfield on the JSON SchemaReference Object?derberg commentedon Jul 11, 2022
dunno, maybe there is already some super bullet-proof regex created by the community that can validate
$refas it can represent, link to file, URL or location inside the existing document. It definitely exceeds my knowledge of regex 😄smoya commentedon Jul 11, 2022
Otherwise, AJV should throw an error (
MissingRefError) anyway. See this example I built: https://onecompiler.com/nodejs/3y9pgk7pysmoya commentedon Oct 25, 2022
Issue is resolved in v2 ParserJS - now in https://github.com/asyncapi/parser-js/tree/next-major branch thanks to Spectral. Pending to add a test.
cc @magicmatatjahu
magicmatatjahu commentedon Nov 15, 2022
Resolved by #676
asyncapi-bot commentedon Dec 13, 2022
🎉 This issue has been resolved in version 2.0.0-next-major.11 🎉
The release is available on:
Your semantic-release bot 📦🚀