mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-07-03 22:20:56 +00:00
Do not generate Application.kt when interfaceOnly=true (#8938)
In an effort to make `kotlin-spring` behave the same as `spring` (java), I disabled generation of the `Application.kt` when interfaceOnly=true. This is similar to what `spring` does: https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java#L368
This commit is contained in:
parent
ed6a7e7656
commit
604e141bf6
@ -419,9 +419,11 @@ public class KotlinSpringServerCodegen extends AbstractKotlinCodegen
|
||||
supportingFiles.add(new SupportingFile("settingsGradle.mustache", "", "settings.gradle"));
|
||||
}
|
||||
|
||||
supportingFiles.add(new SupportingFile("application.mustache", resourceFolder, "application.yaml"));
|
||||
supportingFiles.add(new SupportingFile("springBootApplication.mustache",
|
||||
if (!this.interfaceOnly) {
|
||||
supportingFiles.add(new SupportingFile("application.mustache", resourceFolder, "application.yaml"));
|
||||
supportingFiles.add(new SupportingFile("springBootApplication.mustache",
|
||||
sanitizeDirectory(sourceFolder + File.separator + basePackage), "Application.kt"));
|
||||
}
|
||||
}
|
||||
|
||||
// spring uses the jackson lib, and we disallow configuration.
|
||||
|
Loading…
x
Reference in New Issue
Block a user