-
-
Notifications
You must be signed in to change notification settings - Fork 98
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
Reference resolves to more than one schema #866
Comments
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. |
Update: If I comment the |
You cannot use references for values in examples i.e. this is not valid:
You have to use static values 🙂 |
@jonaslagoni , Its very cumbersome to write same examples again. Also the Its working when I reference an object 1 time in the example but only when I reference the object twice in the examples it throws error. |
Then the extension is bugged, it does not validate before resolving references. I would highly recommend you to create a feature request in the spec 😄 Its not the first time hearing this use case, so its good one 👍 |
@jonaslagoni , I created a feature request, check and let me know if something is missing. |
As its not an issue with Modelina but the spec itself, yes please do 🙂 |
@jonaslagoni , I checked by replacing the references with static values but it still gives me error. Here is the example
Here I have replaced the references in examples with the static values and I receive the below error
If I remove the examples from location schema then only 1 error comes
I think there is some bug in example validation which throws error when the schema1 has multiple references to schema2. |
Yep, but it's parser related 🙂 Moving the issue |
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. |
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 ❤️ |
Describe the bug
Referencing same object multiple times in the message with
$id
in the referencing object causing issue.How to Reproduce
When you run the below cmd
It produces the below output
NOTE : When you remove
$id
fromlocation
schema it works but it will create model withAnonymousSchema_1
name.Expected behavior
It should ignore the previous id and override the object
The text was updated successfully, but these errors were encountered: