asyncapi/java-spring-template

"Error: Template parameter "server" has not been defined" while trying to generate Java Spring Boot

Closed this issue · 5 comments

I'm not able to use Java Spring Boot generator, it throws an error. I've tried using the example, I've downloaded the file, I've used my own asyncapi file that properly renders in playgraound, I've tried the same with docker command and it always throws the same error.

npm version
{
  npm: '7.13.0',
  node: '16.2.0',
  v8: '9.0.257.25-node.16',
  uv: '1.41.0',
  zlib: '1.2.11',
  brotli: '1.0.9',
  ares: '1.17.1',
  modules: '93',
  nghttp2: '1.43.0',
  napi: '8',
  llhttp: '6.0.1',
  openssl: '1.1.1k',
  cldr: '39.0',
  icu: '69.1',
  tz: '2021a',
  unicode: '13.0'
}
npm list -g
/usr/local/lib
├── @asyncapi/generator@1.8.0
├── @asyncapi/java-spring-template@0.23.2
├── graceful-fs@4.2.4
├── npm@7.13.0
└── redis-commander@0.6.5
ag https://bit.ly/asyncapi @asyncapi/java-spring-template -p server=production -o example
Something went wrong:
Error: Template parameter "server" has not been defined in the package.json file under generator property. Please make sure it's listed there before you use it in your template.
    at Object.get [as server] (/usr/local/lib/node_modules/@asyncapi/generator/lib/generator.js:136:19)
    at module.exports.validateTemplateConfig (/usr/local/lib/node_modules/@asyncapi/generator/lib/templateConfigValidator.js:24:59)
    at Generator.generate (/usr/local/lib/node_modules/@asyncapi/generator/lib/generator.js:183:5)
    at /usr/local/lib/node_modules/@asyncapi/generator/cli.js:154:9

Welcome to AsyncAPI. Thanks a lot for reporting your first issue. Please check out our contributors guide and the instructions about a basic recommended setup 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.

Welcome to AsyncAPI. Thanks a lot for reporting your first issue. Please check out our contributors guide and the instructions about a basic recommended setup 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.

Hey, the error happens as it is described, there is no such parameter supported for Java template. Have a look at all the parameters for this template: https://github.com/asyncapi/java-spring-template#supported-parameters.

Is the error confusing? would be great to get some suggestions here

I figured this out too, but it's an issue with the website documentation:
image

yes, the issues for the website is already reported, looking for help there asyncapi/website#312