aboutsummaryrefslogtreecommitdiffstats
path: root/openapi/build.gradle
diff options
context:
space:
mode:
authorFiete Ostkamp <Fiete.Ostkamp@telekom.de>2023-04-14 11:44:19 +0000
committerFiete Ostkamp <Fiete.Ostkamp@telekom.de>2023-04-14 11:44:19 +0000
commitcdc670c5a1c25b0b0ab460b1711a0a42f270b1f3 (patch)
tree41ac6c0e7a52505fd1d0de057df6d5328a853cd0 /openapi/build.gradle
parent1a9b563662e9a9dd1f89e04ce0026e2cc5c4771d (diff)
Upload bff
Issue-ID: PORTAL-1083 Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de> Change-Id: I50f0a2db2dab28354c32c1ebf5a5e22afb0faade
Diffstat (limited to 'openapi/build.gradle')
-rw-r--r--openapi/build.gradle27
1 files changed, 27 insertions, 0 deletions
diff --git a/openapi/build.gradle b/openapi/build.gradle
new file mode 100644
index 0000000..ee9ac96
--- /dev/null
+++ b/openapi/build.gradle
@@ -0,0 +1,27 @@
+apply plugin: 'org.openapi.generator'
+
+void createOpenApiGenerateClientTask(Project project, String apiDefinition, String packageName, String dtoSuffix) {
+ String taskName = "openApiGenerate_$packageName"
+ tasks.create(taskName, org.openapitools.generator.gradle.plugin.tasks.GenerateTask) {
+ generatorName = "java"
+ library = "webclient"
+ inputSpec = "${project.projectDir}/src/$apiDefinition".toString()
+ outputDir = "${project.buildDir}/openapi".toString()
+ configOptions = [
+ openApiNullable : "false",
+ dateLibrary : "java8",
+ serializationLibrary: "jackson"
+ ]
+ typeMappings = [
+ "File": "org.springframework.core.io.buffer.DataBuffer"
+ ]
+ generateApiTests = false
+ generateApiDocumentation = false
+ generateModelTests = false
+ generateModelDocumentation = false
+ invokerPackage = "org.onap.portal.bff.openapi.$packageName"
+ apiPackage = "org.onap.portal.bff.openapi.${packageName}.api"
+ modelPackage = "org.onap.portal.bff.openapi.${packageName}.model"
+ modelNameSuffix = dtoSuffix
+ }
+}