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

Input / output setup #23

Open
smidf opened this issue Sep 20, 2020 · 0 comments
Open

Input / output setup #23

smidf opened this issue Sep 20, 2020 · 0 comments
Labels
enhancement New feature or request invalid This doesn't seem right

Comments

@smidf
Copy link
Contributor

smidf commented Sep 20, 2020

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.
@smidf smidf added enhancement New feature or request invalid This doesn't seem right labels Sep 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

1 participant