-
-
Notifications
You must be signed in to change notification settings - Fork 108
Throw meaningfull error when parser of specific schemaFormat is not available #157
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
Comments
video about the issue https://youtu.be/Iqs_2BiNEEo?t=1857 |
This issue has been automatically marked as stale because it has not had recent activity 😴 |
This issue has been automatically marked as stale because it has not had recent activity 😴 |
This issue has been automatically marked as stale because it has not had recent activity 😴 |
This issue has been automatically marked as stale because it has not had recent activity 😴 |
This issue has been automatically marked as stale because it has not had recent activity 😴 |
Hi @derberg I would like to work on this issue |
@ritik307 go ahead man, make sure to look into previous PR, there was already a lot of work done that you can reuse afaik |
Sure will look into them 😁 |
@derberg I am facing an error in I replaced it with the So is it the correct way to resolve the error or am I doing something wrong here? |
@ritik307 please open up a |
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 ❤️ |
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 ❤️ |
Issue is resolved in v2 ParserJS - now in https://github.com/asyncapi/parser-js/tree/next-major branch in https://github.com/asyncapi/parser-js/blob/next-major/src/schema-parser/index.ts#L34 line - but we probably need to wait for PR for v1 ParserJS #449 What do you think, should we close it or should we wait for #449 PR? |
up to @ritik307 if he can continue. Otherwise close I guess |
Ok @ritik307 I will wait max 2 weeks for your response and in the case without response I will close this one. |
I am closing due to lack of response. |
Describe the bug
We do not check if there is a parser available for a given custom
schemaFormat
and throw not meaningful error thatPARSERS[String(...)] is not a function
Hint: this is where we trigger parsers and we need to validate if the function is really there -> https://github.com/asyncapi/parser-js/blob/master/lib/parser.js#L179
How to Reproduce
Just try to parse the spec with payload defined with some openapi/raml/avro schema. Without registering schema parsers for those schema formats.
Expected behavior
In my opinion we need to add new error type and document it in the readme too https://github.com/asyncapi/parser-js#error-types
How about:
schema-parser-not-registered
? withdetail
property that indicates exactly what message has this problem? and of course exact location of the error in the file.Bonus would be to have an idea how to tell the user that for some schemas there are parsers, and where they can find them
The text was updated successfully, but these errors were encountered: