Skip to content

[Question] How to hook up generateOpenApiDocs to build task? #127

Open
@kkocel

Description

@kkocel

I would like to have openapi file generated during build time.

When I configure generateOpenApiDocs to be run after build:

tasks.named("build") {
    finalizedBy("generateOpenApiDocs")
}

I get the following error:

Some problems were found with the configuration of task ':forkedSpringBootRun' (type 'JavaExecFork').
  - Gradle detected a problem with the following location: '/Users/user/projects/service/build/classes/java/aot'.
    
    Reason: Task ':forkedSpringBootRun' uses this output of task ':compileAotJava' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed.

Is there a recommended way to configure this? If so the it could be put in the README.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions