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

Gradle configuration does not generate classes #338

Closed
slin86 opened this issue Apr 15, 2024 · 4 comments
Closed

Gradle configuration does not generate classes #338

slin86 opened this issue Apr 15, 2024 · 4 comments

Comments

@slin86
Copy link

slin86 commented Apr 15, 2024

We are trying to get this plugin to run with gradle. We have an ASYNC Api definition and want to generate the Api. However, only the "generated-source" folder is created, but no classes are created. In addition, no error is output.

We have already been able to generate code with Maven, so we assume that our asyncapi.yml should be correct. We have also tried the yaml file from the test folder of the project, but here too the folder remains empty.

At root level, the configuration looks like this:

plugins {
    id 'org.springframework.boot' version '3.1.6'
    id 'io.spring.dependency-management' version '1.1.4'
    id 'java'
    id 'maven-publish'
    id 'io.freefair.lombok' version '8.6'
    id 'com.sngular.scs-multiapi-gradle-plugin' version '5.4.1'
}

asyncapimodel {
    specFile {
        {
            filePath = './src/main/resources/test-service.yaml'
            consumer {
                apiPackage = 'en.abc.test.asyncapi'
                modelPackage = 'en.abc.test.asyncapi.model'
            }
        }
        springBootVersion = 3
        overWriteModel = true
    }
}
Copy link

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

@slin86 slin86 changed the title Gradle configuration Gradle configuration does not generate classes Apr 15, 2024
@slin86 slin86 closed this as completed Apr 18, 2024
@slin86
Copy link
Author

slin86 commented Apr 18, 2024

I think, this could be closed

@JerryngtonD
Copy link

JerryngtonD commented May 2, 2024

@slin86 hello :)
could you help me at this problem ? How did you resolve it ?
I faced off with same things.

@slin86
Copy link
Author

slin86 commented May 3, 2024

Hey @JerryngtonD ,
after adding some ids from api spec file, then it was working for us. The autoresolve of consumer did not work for us.

For example:

asyncapimodel {
    specFile {
        {
            filePath = './src/main/resources/test-service.yaml'
            consumer {
                ids = 'consumerA,consumerB'
                apiPackage = 'en.abc.test.asyncapi'
                modelPackage = 'en.abc.test.asyncapi.model'
            }
        }
        springBootVersion = 3
        overWriteModel = true
    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants