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

fix: resolve type mismatch in allServers and allChannels #854

Conversation

KhudaDad414
Copy link
Member

fixes #853

@smoya
Copy link
Member

smoya commented Aug 30, 2023

Nice catch @KhudaDad414! Would you mind adding a test covering those cases? 🙏 Also minor thing, please fix the typo in the PR title.

@KhudaDad414 KhudaDad414 changed the title fix: reslove type mismatch in allServers and allChannels fix: resolve type mismatch in allServers and allChannels Aug 30, 2023
@sonarqubecloud
Copy link

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 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@KhudaDad414
Copy link
Member Author

@smoya Also added some tests for v3 of the same methods.

Comment on lines +125 to +128
const operations: OperationInterface[] = this.operations().all();
this.components().operations().forEach(operation =>
!operations.some(o => o.json() === operation.json()) && operations.push(operation)
);
Copy link
Member

Choose a reason for hiding this comment

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

💯 💯

this.allOperations().forEach(operation => operation.messages().forEach(message => (
!messages.some(m => m.json() === message.json()) && messages.push(message)
)));
const messages: MessageInterface[] = this.messages().all();
Copy link
Member

Choose a reason for hiding this comment

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

💯 💯

Copy link
Member

@smoya smoya left a comment

Choose a reason for hiding this comment

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

LGTM! 🚀🌔

Thank you for this super bug fix and for covering this up with tests 🙌

@KhudaDad414
Copy link
Member Author

/rtm

@asyncapi-bot asyncapi-bot merged commit 58fdca3 into asyncapi:next-major-spec Sep 1, 2023
@asyncapi-bot
Copy link
Contributor

🎉 This PR is included in version 3.0.0-next-major-spec.2 🎉

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.

3 participants