Skip to content
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 request and reply pattern #795

Merged
merged 176 commits into from
Nov 16, 2023

Conversation

AceTheCreator
Copy link
Member

@AceTheCreator AceTheCreator commented Oct 2, 2023

This PR adds support for request and reply patterns by introducing a new component that renders reply information such as:

  • reply channel information such as address, description, message(s) and so on
  • Reply address information such as address, location, and description
AsyncApi.React.Playground.App.-.16.November.2023.mp4

This PR also fixes the PUB/SUB reversal experienced in this issue #815

cc @jonaslagoni @magicmatatjahu

magicmatatjahu and others added 30 commits March 18, 2021 12:32
chore(release): v1.0.0-next.1
chore(release): v1.0.0-next.2
chore(release): v1.0.0-next.3
chore(release): v1.0.0-next.4
@derberg
Copy link
Member

derberg commented Nov 6, 2023

dunno but can't refresh locally 🤷🏼
luckily I made it with gitpod: https://gitpod.io/#https://github.com/AceTheCreator/asyncapi-react/tree/req/rep


tested with https://raw.githubusercontent.com/asyncapi/spec/next-major-spec/examples/kraken-websocket-request-reply-multiple-channels-asyncapi.yml

issue: reply for subscribe operation do not have much channel details for reply, only reply address - missing info about messages. Basically Expected Reply Messages is missing

Screenshot 2023-11-06 at 15 42 18


tested with https://raw.githubusercontent.com/asyncapi/spec/next-major-spec/examples/kraken-websocket-request-reply-message-filter-in-reply-asyncapi.yml and works like a charm


tested with https://raw.githubusercontent.com/asyncapi/spec/next-major-spec/examples/adeo-kafka-request-reply-asyncapi.yml

issue: Playground crash. Cannot figure errors, strange as latest parser is used and the bug with kafka binding was supposed to be fixed there. Will investigate


tested with https://raw.githubusercontent.com/asyncapi/spec/next-major-spec/examples/streetlights-kafka-asyncapi.yml

issue: no operations rendered, just Operations header


last but not least - I think #795 (comment) is broken again

@AceTheCreator
Copy link
Member Author

@derberg I added suggested changes. Kindly give it a look :)

@derberg
Copy link
Member

derberg commented Nov 13, 2023

tested with https://raw.githubusercontent.com/asyncapi/spec/next-major-spec/examples/adeo-kafka-request-reply-asyncapi.yml
issue: Playground crash. Cannot figure errors, strange as latest parser is used and the bug with kafka binding was supposed to be fixed there. Will investigate

did you have a chance to check what is wrong here?

tested with https://raw.githubusercontent.com/asyncapi/spec/next-major-spec/examples/streetlights-kafka-asyncapi.yml
issue: no operations rendered, just Operations header

Operations are still empty


also some issue with rendering of examples in reply

Screenshot 2023-11-13 at 10 31 33

@AceTheCreator
Copy link
Member Author

tested with https://raw.githubusercontent.com/asyncapi/spec/next-major-spec/examples/streetlights-kafka-asyncapi.yml
issue: no operations rendered, just Operations header

Operations are still empty

@derberg Based on my investigation, The issue is actually related to the way Parser is handling the Operation traits. I get the list of Operations only when I get rid of the traits.

cc @smoya

@AceTheCreator
Copy link
Member Author

tested with https://raw.githubusercontent.com/asyncapi/spec/next-major-spec/examples/adeo-kafka-request-reply-asyncapi.yml
issue: Playground crash. Cannot figure errors, strange as latest parser is used and the bug with kafka binding was supposed to be fixed there. Will investigate

did you have a chance to check what is wrong here?

Same as last time. Playground only renders when I remove the Message level bindings 🤷🏾‍♂️

@derberg
Copy link
Member

derberg commented Nov 14, 2023

@AceTheCreator I see for message issue you have created asyncapi/parser-js#877, and what about operations? maybe update message-related issue or create a new one for operations

@derberg
Copy link
Member

derberg commented Nov 14, 2023

so in this PR only styling of examples left?

@AceTheCreator
Copy link
Member Author

so in this PR only styling of examples left?

Yes

@AceTheCreator
Copy link
Member Author

AceTheCreator commented Nov 15, 2023

@derberg Examples styling fixed

@derberg derberg changed the title feat: added support for req/rep feat: add support for request and reply pattern Nov 16, 2023
Copy link
Member

@derberg derberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 small comments + please update description to reflect current state of the PR

then we can merge

"@asyncapi/protobuf-schema-parser": "3.0.0",
"@asyncapi/parser": "^3.0.0-next-major-spec.7",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please use latest v3.0.0-next-major-spec.10

@@ -28,7 +28,7 @@
"react-scripts": "3.1.2"
},
"scripts": {
"start": "react-app-rewired start",
"start": "react-app-rewired --openssl-legacy-provider start",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please revert, as with this I cannot start local playground anymore, and need to manually remove that flag

Copy link

sonarcloud bot commented Nov 16, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 4 Code Smells

No Coverage information No Coverage information
2.0% 2.0% Duplication

@AceTheCreator
Copy link
Member Author

added suggested changes @derberg

Copy link
Member

@derberg derberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awesome hard work!

@derberg
Copy link
Member

derberg commented Nov 16, 2023

/rtm

@asyncapi-bot asyncapi-bot merged commit 12c339b into asyncapi:master Nov 16, 2023
14 checks passed
@asyncapi-bot
Copy link
Contributor

🎉 This PR is included in version 1.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.