Skip to content

Input / output setup #23

Description

@smidf

Partly depends on #22

the minimum Gradle plugin / task setting is e.g. the following:

configure<SwaggerCodeGenConfig> {
    sourcePath = "${project.projectDir.absolutePath}/openapi"
    outputPath = "${buildDir.absolutePath}/openapi"
    ...
}

val generatedPetStoreSrcDir = File(buildDir, "openapi/<name>/src/main/kotlin")
sourceSets {
    getByName("main").java.srcDirs(generatedPetStoreSrcDir)
}
  1. I would set sourcePath to ./ instead of ./spec or ./specification
  2. The vast majority of generators set the output automatically, e.g. <buildDir>/generated/source/<name>. This directory is also added to sourceSets automatically. I would assume that the generator will behave the same way.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestinvalidThis doesn't seem right

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions