springdoc / springdoc-openapi-gradle-plugin

Library for OpenAPI 3 with spring-boot
https://springdoc.org
Apache License 2.0
148 stars 47 forks source link

Update to 1.9.0 not possible #149

Open schowave opened 4 months ago

schowave commented 4 months ago

Hey, I want to update the springdoc-openapi-gradle-plugin to Version 1.9.0, but this is not possible because the generateOpenApiDocs does not work.

Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name

With Version 1.8.0 this worked perfectly. My gradle configuration:

plugins {
    id("org.springdoc.openapi-gradle-plugin:1.8.0")
}

dependencies {
    implementation("org.springdoc:springdoc-openapi-starter-webmvc-ui:2.6.0")
}

openApi {
    outputDir.set(layout.buildDirectory.dir("open-api"))
    outputFileName.set("api-docs.yaml")
    customBootRun {
        args = listOf("--spring.profiles.active=local")
    }
}

Furthermore in my renovate MR I see, that the adoption is 0%, are others also having issues here? image

schowave commented 3 months ago

I managed to mitigate the problem by adding the following line to the customBootRun, as described here: https://github.com/springdoc/springdoc-openapi-gradle-plugin/issues/150#issuecomment-2235972725

customBootRun { workingDir.set(project.rootProject.projectDir) }

Then the update to 1.9.0 was possible.

StemadsenCardlay commented 5 days ago

Thank you! Version 1.9.0 contains a breaking change, they should have made it version 2.0.0.