From b146259516cc90cc9084bdf2f69c358b896cfdf7 Mon Sep 17 00:00:00 2001 From: Fiete Ostkamp Date: Tue, 11 Jul 2023 08:44:51 +0000 Subject: history repo code is missing Issue-ID: PORTALNG-8 Signed-off-by: Fiete Ostkamp Change-Id: I01f1789eb840661115bfd806a0622d02666100c0 --- openapi/build.gradle | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 openapi/build.gradle (limited to 'openapi/build.gradle') diff --git a/openapi/build.gradle b/openapi/build.gradle new file mode 100644 index 0000000..505ac7b --- /dev/null +++ b/openapi/build.gradle @@ -0,0 +1,53 @@ +plugins { + id 'org.onap.portal.history.java-application-conventions' + id 'org.openapi.generator' +} + +ext { + openapiVersion = '6.0.1' +} + +dependencies { + implementation "org.openapitools:openapi-generator:$openapiVersion" + // 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.history.openapi" + apiPackage = "org.onap.portal.history.openapi.api" + modelPackage = "org.onap.portal.history.openapi.model" +} + +compileJava { + dependsOn tasks.openApiGenerate +} + +sourceSets { + main { + java { + srcDirs += file("$buildDir/openapi/src/main/java") + } + } +} + + -- cgit 1.2.3-korg