Mrc0113 / design-to-code-workshop

This repository holds the code artifacts used during the "Design to Code using Portal + AsyncAPI Code Generation" workshop
Apache License 2.0
1 stars 1 forks source link

AsyncAPI Generator issue : Error: Not all channel parameters are described with parameter object #1

Closed karthikairam closed 3 years ago

karthikairam commented 3 years ago

Hi @Mrc0113 ,

I am getting error while trying to execute AsyncAPI generator command. I have double verified with your file from git as well, and it is same issue. Version of Async Generator used: 1.0.0-rc.11

Command: ag -o RideDropoffProcessor -p binder=solace -p reactive=true -p actuator=true -p artifactId=RideDropoffProcessor -p groupId=org.taxi.nyc -p javaPackage=org.taxi.nyc -p host=mr-m9980gjfswx.messaging.solace.cloud:55555 -p username=public-taxi-user -p password=iliketaxis -p msgVpn=springone ~/Documents/Solace/solace-taxi-demo-app/RideDropoffProcessor.yaml @asyncapi/java-spring-cloud-stream-template

Something went wrong: Error: Not all channel parameters are described with parameter object at validateChannelParams (/usr/local/lib/node_modules/@asyncapi/generator/node_modules/@asyncapi/parser/lib/customValidators.js:78:11) at customDocumentOperations (/usr/local/lib/node_modules/@asyncapi/generator/node_modules/@asyncapi/parser/lib/parser.js:173:3) at parse (/usr/local/lib/node_modules/@asyncapi/generator/node_modules/@asyncapi/parser/lib/parser.js:102:11) at async Generator.generateFromString (/usr/local/lib/node_modules/@asyncapi/generator/lib/generator.js:234:21) at async /usr/local/lib/node_modules/@asyncapi/generator/cli.js:123:9 [ { "title": "taxi/nyc/v1/${ride_status}/${passenger_count}/${ride_id}/${longitude}/${latitude} channel does not have a corresponding parameter object for: ride_status,passenger_count,ride_id,longitude,latitude", "location": { "jsonPointer": "/channels/taxi~1nyc~1v1~1${ride_status}~1${passenger_count}~1${ride_id}~1${longitude}~1${latitude}", "startLine": 182, "startColumn": 3, "startOffset": 6035, "endLine": 187, "endColumn": 55, "endOffset": 6319 } } ]

Mrc0113 commented 3 years ago

Hi @karthikaiselvan, Can you try using the latest generator release (v0.53.1) instead? The release candidates are changing on a day to day basis and they're testing with some extra validation which may not make it into the next release.

You should be able to install that version by running npm install -g @asyncapi/generator@0.53.1 And can check the version by running ag -V afterwards.

Hope that helps!

karthikairam commented 3 years ago

It works when I use AsyncAPI generator version as 0.53.1 instead of 1.0.0-rc.11. Thanks @Mrc0113 Cheers!