Repository navigation
fix!: traits, id and reply problems for v3 - #910
Merged
asyncapi-bot merged 7 commits intoNov 29, 2023
Merged
Conversation
jonaslagoni
commented
Nov 28, 2023
Comment on lines
+47
to
+59
| // Normalize input to always be JSON | ||
| let loadedObj; | ||
| if (typeof asyncapi === 'string') { | ||
| try { | ||
| loadedObj = yaml.load(asyncapi); | ||
| } catch (e) { | ||
| loadedObj = JSON.parse(asyncapi); | ||
| } | ||
| } else { | ||
| loadedObj = asyncapi; | ||
| } | ||
| // Apply unique ids before resolving references | ||
| applyUniqueIds(loadedObj); |
Member
Author
There was a problem hiding this comment.
In order to apply unique IDs I had to control the input and force any input (string/yaml/json, and pure objects) to adapt them.
jonaslagoni
marked this pull request as ready for review
November 28, 2023 07:40
jonaslagoni
requested review from
asyncapi-bot-eve,
fmvilas,
magicmatatjahu and
smoya
as code owners
November 28, 2023 07:40
fmvilas
approved these changes
Nov 29, 2023
Member
Author
|
/rtm |
|
Kudos, SonarCloud Quality Gate passed! |
Contributor
|
🎉 This PR is included in version 3.0.0-next-major-spec.15 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.








Description
This PR fixes a bunch of different edge cases with traits and ID's not being correctly created. Ontop of this, reply.messages had incorrect type as it's an array of messages NOT record, this is a breaking change.
Related issue(s)
Fixes #873
Fixes #856
Only one approach is needed, this PR or #895 for solving #873