-
-
Notifications
You must be signed in to change notification settings - Fork 34
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
Something went wrong: Template render error #10
Comments
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. |
Hi Jose. The reason it fails is that you do not have fully correct AsyncAPI document.
According to the spec:
You are basically missing Security Scheme Object in Components Object. For some valid example of how to do it properly, you could have a look here @josejamilena I hope that helps, let me know What is concerning me here though is, that the error you got was on a template lever, not parse level. For the parser your document is fine, which I don't believe it is true if the spec says |
Agree @derberg. I just listed it here: asyncapi/parser-js#10. Thanks! |
Hi. I'm trying to generate code, but I don't understand the error in the template. Could you check if it's my problem or if there's a problem with the template?
Something went wrong: Template render error: (C:\Users\JAMILENADAZJ\eclipse-workspace\asyncapi\tmp\node_modules\@asyncapi\java-spring-cloud-stream-template\template\src\main\java\$$schema$$.java) [Line 53, Column 12] TypeError: Cannot read property 'items' of undefined at Object._prettifyError (C:\Users\JAMILENADAZJ\AppData\Roaming\npm\node_modules\@asyncapi\generator\node_modules\nunjucks\src\lib.js:36:11) at C:\Users\JAMILENADAZJ\AppData\Roaming\npm\node_modules\@asyncapi\generator\node_modules\nunjucks\src\environment.js:561:19 at eval (eval at _compile (C:\Users\JAMILENADAZJ\AppData\Roaming\npm\node_modules\@asyncapi\generator\node_modules\nunjucks\src\environment.js:631:18), <anonymous>:29:11) at C:\Users\JAMILENADAZJ\AppData\Roaming\npm\node_modules\@asyncapi\generator\node_modules\nunjucks\src\environment.js:611:9 at Template.root [as rootRenderFunc] (eval at _compile (C:\Users\JAMILENADAZJ\AppData\Roaming\npm\node_modules\@asyncapi\generator\node_modules\nunjucks\src\environment.js:631:18), <anonymous>:740:3) at Template.getExported (C:\Users\JAMILENADAZJ\AppData\Roaming\npm\node_modules\@asyncapi\generator\node_modules\nunjucks\src\environment.js:609:10) at eval (eval at _compile (C:\Users\JAMILENADAZJ\AppData\Roaming\npm\node_modules\@asyncapi\generator\node_modules\nunjucks\src\environment.js:631:18), <anonymous>:28:5) at Environment.getTemplate (C:\Users\JAMILENADAZJ\AppData\Roaming\npm\node_modules\@asyncapi\generator\node_modules\nunjucks\src\environment.js:277:9) at eval (eval at _compile (C:\Users\JAMILENADAZJ\AppData\Roaming\npm\node_modules\@asyncapi\generator\node_modules\nunjucks\src\environment.js:631:18), <anonymous>:26:5) at eval (eval at _compile (C:\Users\JAMILENADAZJ\AppData\Roaming\npm\node_modules\@asyncapi\generator\node_modules\nunjucks\src\environment.js:631:18), <anonymous>:23:1) at fn (C:\Users\JAMILENADAZJ\AppData\Roaming\npm\node_modules\@asyncapi\generator\node_modules\a-sync-waterfall\index.js:26:24) at C:\Users\JAMILENADAZJ\AppData\Roaming\npm\node_modules\@asyncapi\generator\node_modules\a-sync-waterfall\index.js:66:22 at executeSync (C:\Users\JAMILENADAZJ\AppData\Roaming\npm\node_modules\@asyncapi\generator\node_modules\a-sync-waterfall\index.js:8:15) at C:\Users\JAMILENADAZJ\AppData\Roaming\npm\node_modules\@asyncapi\generator\node_modules\a-sync-waterfall\index.js:65:11 at eval (eval at _compile (C:\Users\JAMILENADAZJ\AppData\Roaming\npm\node_modules\@asyncapi\generator\node_modules\nunjucks\src\environment.js:631:18), <anonymous>:18:1) at C:\Users\JAMILENADAZJ\AppData\Roaming\npm\node_modules\@asyncapi\generator\node_modules\nunjucks\src\environment.js:569:11
node --version ==> v12.16.1
Launch command ==> ag --force-write ..\AsyncAPI-2.0.0.yaml https://github.com/asyncapi/java-spring-cloud-stream-template.git
The asyncAPI I've defined is this
AsyncAPI-2.0.0.yaml.zip
Thanks.
The text was updated successfully, but these errors were encountered: