sngular / scs-multiapi-plugin

This is a Maven plugin designed to help developers automatizing the creation of code classes from YML files based on AsyncApi and OpenAPI.
http://sngular.com
Mozilla Public License 2.0
48 stars 10 forks source link

[SCS-MultiApi-Gradle-Plugin]: AsyncApi task throws no matching constructor exception #244

Closed zlaval closed 1 year ago

zlaval commented 1 year ago

I'm working on an AsyncAPI design and found this plugin for generating classes from the spec for Spring Boot 3.

I'm using the latest version.

id("com.sngular.scs-multiapi-gradle-plugin") version "4.8.1"

When i tried to run the plugin i got the following error: Could not find matching constructor for: com.sngular.api.generator.plugin.asyncapi.AsyncApiGenerator(File, String, String, File, Integer)

After a quick check, i found that in the AsyncApiTask.groovy the task calls AsyncApGenerator with the following parameters:

def asyncApiGen = new com.sngular.api.generator.plugin.asyncapi.AsyncApiGenerator(targetFolder, generatedDir, project.getGroup() as String, project.getProjectDir(), asyncApiModelExtension.getSpringBootVersion())

But the AsyncApiGenerator.java has the following constructor:

public AsyncApiGenerator(final Integer springBootVersion, final File targetFolder, final String processedGeneratedSourcesFolder, final String groupId, final File baseDir)

The spring boot version param is in the beginning of the generator class but the task call put it at the and of the param list.

I'm new with Gradle plugins, but it seems to me a bug. I've checked this on the main branch.

github-actions[bot] commented 1 year ago

Thank you for collaborating with the project by giving us feedback! Cheers!

5uso-sng commented 1 year ago

Hi, thanks for the report! It seems this one slipped through last week. Will take care of it as soon as possible

5uso-sng commented 1 year ago

The release fixing this issue should be available shortly. Fix version is 4.8.3. Thanks again!

zlaval commented 1 year ago

Thank you.