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

Add method .hasMessages() #84

Closed
WaleedAshraf opened this issue Jun 2, 2020 · 6 comments · Fixed by #85
Closed

Add method .hasMessages() #84

WaleedAshraf opened this issue Jun 2, 2020 · 6 comments · Fixed by #85
Labels
enhancement New feature or request released

Comments

@WaleedAshraf
Copy link
Contributor

Add method asyncapi.hasMessages() like we have others, asyncapi.hasChannels().
This will be used to check if messages are defined, and then show them in a separate section.

To be used here:
asyncapi/html-template#31 (review)

Related PR: asyncapi/html-template#31

@WaleedAshraf WaleedAshraf added the enhancement New feature or request label Jun 2, 2020
@github-actions
Copy link

github-actions bot commented Jun 2, 2020

Welcome to AsyncAPI. Thanks a lot for reporting your first issue.

Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.

@derberg
Copy link
Member

derberg commented Jun 5, 2020

@fmvilas what is you view on this. asyncapi.hasChannels() and asyncapi.hasServers() make sense as channels and servers are root elements, messages are not. But I do not think we are super strict in models here right? because we already have asyncapi.allMessages() then why not having asyncapi.hasMessages()? right?

@fmvilas
Copy link
Member

fmvilas commented Jun 5, 2020

It totally makes sense, yes. Actually, the purpose of the parser is to eventually offer an abstract infterface that's independent of the AsyncAPI document structure. This is a good example.

@asyncapi-bot
Copy link
Contributor

🎉 This issue has been resolved in version 0.19.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@fmvilas
Copy link
Member

fmvilas commented Jun 15, 2020

Yes. We can probably have another issue to target all those missing methods. Not necessarily for v1 though.

@derberg
Copy link
Member

derberg commented Jun 15, 2020

@fmvilas yeap, added #88

@derberg derberg added this to the Make JS parser stable milestone Jun 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants