generator
generator copied to clipboard
feat: add `$$operation$$` file template
Description
I added $$operation$$ as a file template.
Related issue(s)
#1116
@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 passed
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code
@jonaslagoni I don't think we make it clear in docs what is the file templates alternative in react, how to do it
@derberg well no I dont think we have a "coming from Nunjucks to React guide" 🤔
@jonaslagoni yeah, to be honest I did not recall file templates are actually useful for nunjucks only 😄
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 react one
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 react so you do not need file templates. Have a look at examples I shared in previous comment and lemme know
@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 -> https://github.com/asyncapi/generator/issues/1199