Skip to content
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

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

Closed
zlaval opened this issue May 13, 2023 · 4 comments · Fixed by #245
Closed

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

zlaval opened this issue May 13, 2023 · 4 comments · Fixed by #245
Assignees
Labels
bug Something isn't working

Comments

@zlaval
Copy link

zlaval commented May 13, 2023

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
Copy link

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

@5uso-sng 5uso-sng self-assigned this May 15, 2023
@5uso-sng 5uso-sng added the bug Something isn't working label May 15, 2023
@5uso-sng
Copy link
Contributor

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

5uso-sng added a commit that referenced this issue May 15, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
…tructor exception (#245)

* #238 AsyncAPI test no schemas

* #238 Update test

* #238 Ensure message inlined schemas are generated

* Update version

* Shorten channel schema collection

* Remove redundant logic

* #238 Change asyncgen parameter constructor order

* Fix pom

* Add description for spring version
@5uso-sng
Copy link
Contributor

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

@zlaval
Copy link
Author

zlaval commented May 15, 2023

Thank you.

jemacineiras pushed a commit that referenced this issue Jun 29, 2023
…tructor exception (#245)

* #238 AsyncAPI test no schemas

* #238 Update test

* #238 Ensure message inlined schemas are generated

* Update version

* Shorten channel schema collection

* Remove redundant logic

* #238 Change asyncgen parameter constructor order

* Fix pom

* Add description for spring version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants