-
-
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
feat: add support for multi-format schema #814
feat: add support for multi-format schema #814
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I won't to request changes to not block you, but I have some comments. Very well! :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small comments 👍
@@ -26,20 +26,6 @@ describe('Message model', function() { | |||
}); | |||
}); | |||
|
|||
describe('.schemaFormat()', function() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why remove the tests when we still have the functions? 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reality is that message should not have the schemaFormat
method but only the MessageTrait. See https://github.com/asyncapi/parser-api/pull/86/files#diff-ac35ac6e0b0ad3629802a0e04076aa18e94da614f5392e1164dcaacdfe3ee198L157
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think i will need to change the way inheritance is being made atm... Just adding a bit of composition with a intermediate model MessageBase
that both Message
+ MessageTrait
extend from.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After thinking again and again, makes sense to keep schemaFormat
+ add hasSchemaFormat
to messageObject
as well so we reduce the BC impact. I applied the changes + changes in parser-api. See asyncapi/parser-api#86 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this test method is back now
@@ -26,20 +20,6 @@ describe('Message model', function() { | |||
}); | |||
}); | |||
|
|||
describe('.schemaFormat()', function() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why remove the tests when we still have the functions? 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reality is that message should not have the schemaFormat
method but only the MessageTrait. See https://github.com/asyncapi/parser-api/pull/86/files#diff-ac35ac6e0b0ad3629802a0e04076aa18e94da614f5392e1164dcaacdfe3ee198L157
f8fa397
to
e067a7c
Compare
e067a7c
to
035486c
Compare
@magicmatatjahu @jonaslagoni this is now ready for review again 🙏 |
Kudos, SonarCloud Quality Gate passed! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, @magicmatatjahu do you want to have a look again?
Merging, if you have anything @magicmatatjahu it can be addressed afterwards 🙂 |
🎉 This PR is included in version 2.1.0-next-major-spec.3 🎉 The release is available on: Your semantic-release bot 📦🚀 |
🎉 This PR is included in version 2.2.0-next-major-spec.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Description
This PR adds the required changes for supporting Multi-format schemas.
The API changes are in this
parser-api
PR asyncapi/parser-api#86 waiting to be reviewed.Replaces #785
Related issue(s)
asyncapi/spec#622