forked from loafle/openapi-generator-original
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,10 +419,12 @@ public class KotlinSpringServerCodegen extends AbstractKotlinCodegen
|
|||||||
supportingFiles.add(new SupportingFile("settingsGradle.mustache", "", "settings.gradle"));
|
supportingFiles.add(new SupportingFile("settingsGradle.mustache", "", "settings.gradle"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!this.interfaceOnly) {
|
||||||
supportingFiles.add(new SupportingFile("application.mustache", resourceFolder, "application.yaml"));
|
supportingFiles.add(new SupportingFile("application.mustache", resourceFolder, "application.yaml"));
|
||||||
supportingFiles.add(new SupportingFile("springBootApplication.mustache",
|
supportingFiles.add(new SupportingFile("springBootApplication.mustache",
|
||||||
sanitizeDirectory(sourceFolder + File.separator + basePackage), "Application.kt"));
|
sanitizeDirectory(sourceFolder + File.separator + basePackage), "Application.kt"));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// spring uses the jackson lib, and we disallow configuration.
|
// spring uses the jackson lib, and we disallow configuration.
|
||||||
additionalProperties.put("jackson", "true");
|
additionalProperties.put("jackson", "true");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user