aboutsummaryrefslogtreecommitdiffstats
path: root/openapi/build.gradle
diff options
context:
space:
mode:
authorFiete Ostkamp <Fiete.Ostkamp@telekom.de>2023-04-14 11:39:12 +0000
committerFiete Ostkamp <Fiete.Ostkamp@telekom.de>2023-04-14 11:39:12 +0000
commita29488d0f476eae0a7821026ded3cf538256757b (patch)
tree4ad1d38150cea6cea0659fed0c15d5bf05ad42fd /openapi/build.gradle
parenteeb1ede1a2ae8c55a4d432db80394e02506696fe (diff)
Upload preferences
Issue-ID: PORTAL-1082 Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de> Change-Id: I265e0c8be481a279347aa653acc483c5017c996d
Diffstat (limited to 'openapi/build.gradle')
-rw-r--r--openapi/build.gradle53
1 files changed, 53 insertions, 0 deletions
diff --git a/openapi/build.gradle b/openapi/build.gradle
new file mode 100644
index 0000000..01664eb
--- /dev/null
+++ b/openapi/build.gradle
@@ -0,0 +1,53 @@
+plugins {
+ id 'java'
+ id 'idea'
+ id 'org.openapi.generator' version '5.3.0'
+}
+
+repositories {
+ mavenCentral()
+}
+
+dependencies {
+ implementation 'org.openapitools:openapi-generator:5.3.0'
+ implementation 'org.springframework.boot:spring-boot-starter-webflux:2.5.5'
+ // NOTE(KE) needed to add these dependencies, check in next version whether its removable...
+ // https://github.com/OpenAPITools/openapi-generator/issues/8360
+ compileOnly "io.springfox:springfox-swagger2:3.0.0"
+}
+
+// https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator-gradle-plugin/README.adoc
+openApiGenerate {
+ generatorName = "spring"
+ library = "spring-boot"
+ inputSpec = "$projectDir/src/main/resources/api/api.yml"
+ outputDir = "$buildDir/openapi"
+ configOptions = [
+ openApiNullable: "false",
+ skipDefaultInterface: "true",
+ dateLibrary: "java8",
+ interfaceOnly: "true",
+ useTags: "true",
+ useOptional: "true",
+ reactive: "true"
+ ]
+ generateApiTests = false
+ generateApiDocumentation = false
+ generateModelTests = false
+ generateModelDocumentation = false
+ invokerPackage = "org.onap.portal.prefs.openapi"
+ apiPackage = "org.onap.portal.prefs.openapi.api"
+ modelPackage = "org.onap.portal.prefs.openapi.model"
+}
+
+compileJava {
+ dependsOn tasks.openApiGenerate
+}
+
+sourceSets {
+ main {
+ java {
+ srcDirs += file("$buildDir/openapi/src/main/java")
+ }
+ }
+}