diff options
author | Fiete Ostkamp <Fiete.Ostkamp@telekom.de> | 2023-04-14 11:44:19 +0000 |
---|---|---|
committer | Fiete Ostkamp <Fiete.Ostkamp@telekom.de> | 2023-04-14 11:44:19 +0000 |
commit | cdc670c5a1c25b0b0ab460b1711a0a42f270b1f3 (patch) | |
tree | 41ac6c0e7a52505fd1d0de057df6d5328a853cd0 /openapi/build.gradle | |
parent | 1a9b563662e9a9dd1f89e04ce0026e2cc5c4771d (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.gradle | 27 |
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 + } +} |