-
-
Notifications
You must be signed in to change notification settings - Fork 238
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 $$operation$$
file template
#1117
feat: add $$operation$$
file template
#1117
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.
Welcome to AsyncAPI. Thanks a lot for creating your first pull request. Please check out our contributors guide useful for opening a pull request.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.
@jonaslagoni I see that you introduced the v3 support. Does it make any sense what I am suggesting or am I missing something? |
Quality Gate passedIssues Measures |
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.
@lukas-mertens we can add it, however, I would highly suggest to use the react rendering engine instead 😄
But yea, makes sense 👍
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.
Seems like the tests are failing ✌️
@@ -743,6 +744,7 @@ class Generator { | |||
objectSchema, | |||
parameter: convertMapToObject(this.getAllParameters(asyncapiDocument)), | |||
everySchema: convertMapToObject(asyncapiDocument.allSchemas()), | |||
operation: convertCollectionToObject(asyncapiDocument.allOperations()), |
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.
shouldn't you use convertMapToObject
like other parts?
$$operation$$
file template
@jonaslagoni I don't think we make it clear in docs what is the |
@derberg well no I dont think we have a "coming from Nunjucks to React guide" 🤔 |
@jonaslagoni yeah, to be honest I did not recall we have at least comparizon from the perspective of "template for templates". So we see file templates in use in https://github.com/asyncapi/template-for-generator-templates/tree/nunjucks/template/schemas in times of nunjucks and then after conversion to react https://github.com/asyncapi/template-for-generator-templates/blob/master/template/schemas/schema.js just to be sure, @lukas-mertens what templating engine are you using? |
@derberg Yeah, I am using the old one. I didn't see it in any documentation that a new one exists and I was building my template based on https://github.com/asyncapi/dotnet-nats-template/tree/master I didn't know it is that outdated back then. It would be really nice to have a few reference-implementations based on the new api version and new renderer |
actually https://github.com/asyncapi/dotnet-nats-template/tree/master runs on new engine, the also in docs that talk about template development we reference this template example implementation -> https://github.com/asyncapi/template-for-generator-templates is the source code of your template somewhere available? my assumption is you use |
@lukas-mertens hey, did you have a chance to have a look at it? |
closing this PR we should not add more features to Nunjucks. and for React - functionality is already in place - we just need to properly document it -> #1199 |
Description
I added
$$operation$$
as a file template.Related issue(s)
#1116