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: display protocol bindings on server, channel, operation, message #176

Merged
merged 4 commits into from
Apr 12, 2021

Conversation

M3lkior
Copy link
Contributor

@M3lkior M3lkior commented Apr 2, 2021

Here is the result with the dummy file on asyncapi/generator#556

Channel and operation bindings :

image

By the way, it seems that settings bindings on a channel is not handle by the parser (see the dummy file content and the related generation)

For message bindings :
image

image

image

Resolves #25

@M3lkior M3lkior force-pushed the feat/display-bindings branch 2 times, most recently from 1fa4479 to cc791fd Compare April 2, 2021 16:32
@derberg
Copy link
Member

derberg commented Apr 6, 2021

@M3lkior what about server bindings?

By the way, it seems that settings bindings on a channel is not handle by the parser (see the dummy file content and the related generation)

sorry but I didn't get that

{% endmacro %}


{% macro bindings(eltName, elt, odd=false) %}
Copy link
Member

Choose a reason for hiding this comment

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

what elt stands for?

Copy link
Member

Choose a reason for hiding this comment

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

like element? if they then better use prop that is common in other macros in this template

Copy link
Contributor Author

@M3lkior M3lkior Apr 9, 2021

Choose a reason for hiding this comment

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

yes this is for element because this macro can take a Message element, or a Channel or an Operation ... etc

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Copy link
Member

@magicmatatjahu magicmatatjahu left a comment

Choose a reason for hiding this comment

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

Awesome! For me everything is good, except only what @derberg wrote about elt could be improved to make it clearer.

@M3lkior
Copy link
Contributor Author

M3lkior commented Apr 9, 2021

@M3lkior what about server bindings?

By the way, it seems that settings bindings on a channel is not handle by the parser (see the dummy file content and the related generation)

sorry but I didn't get that

it was a bug in the code ;) all is good now (i actualized my screenshot)

@M3lkior M3lkior force-pushed the feat/display-bindings branch from 72b3e10 to f4a6250 Compare April 9, 2021 16:10

{% if prop.hasBindings() %}
{% for protocol in prop.bindingProtocols() %}
<div class="{% if open %}is-open{% endif %} mb-4">
Copy link
Member

Choose a reason for hiding this comment

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

usage of mt-4 make it look much more aligned, have a look

Screenshot 2021-04-12 at 11 00 10

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done ; i do uniformization to align all elements (even in the collapsed blocks)

I think that we need to develop a macro for those blocks (in order to keep the same style over all rendering blocks)

@derberg
Copy link
Member

derberg commented Apr 12, 2021

I just left one comment on visuals, but in general, it looks great. I think we need to get https://github.com/M3lkior/html-template/tree/feat/display-bindings merged first.

and what about rendering bindings for a server?

@sonarqubecloud
Copy link

Kudos, SonarCloud 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
0.0% 0.0% Duplication

@M3lkior
Copy link
Contributor Author

M3lkior commented Apr 12, 2021

I just left one comment on visuals, but in general, it looks great. I think we need to get https://github.com/M3lkior/html-template/tree/feat/display-bindings merged first.

and what about rendering bindings for a server?

Oups .. done this is the related rendering :
image

@derberg derberg changed the title feat(bindings): display bindings on channel, operation and message level feat: display protocol bindings on server, channel, operation, message Apr 12, 2021
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.

lgtm, great stuff!

@derberg derberg merged commit bcd3c9c into asyncapi:master Apr 12, 2021
@M3lkior M3lkior deleted the feat/display-bindings branch April 12, 2021 15:00
@asyncapi-bot
Copy link
Contributor

🎉 This PR is included in version 0.19.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
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature request] Make generator html/markdown support bindings
4 participants