aboutsummaryrefslogtreecommitdiffstats
path: root/openapi/client-history/build.gradle
blob: ef47381e62c368add8205cae00368e93ce8afdd7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
plugins {
  id 'java'
  id 'idea'
  id 'org.openapi.generator'
}

dependencies {
  compileOnly "org.springframework.boot:spring-boot-starter-webflux:$springBootVersion"
  compileOnly "org.openapitools:openapi-generator:$openapiVersion"
}

openApiGenerate {
    generatorName = "java"
    library = "webclient"
    inputSpec = "${project.projectDir}/src/api.yaml"
    outputDir = "${project.buildDir}/openapi"
    configOptions = [
      openApiNullable     : "false",
      dateLibrary         : "java8",
      serializationLibrary: "jackson",
      useJakartaEe        : "true",
    ]
    typeMappings = [
            "File": "org.springframework.core.io.buffer.DataBuffer"
    ]
    generateApiTests = false
    generateApiDocumentation = false
    generateModelTests = false
    generateModelDocumentation = false
    invokerPackage = "org.onap.portalng.bff.openapi.client_history"
    apiPackage = "org.onap.portalng.bff.openapi.client_history.api"
    modelPackage = "org.onap.portalng.bff.openapi.client_history.model"
    modelNameSuffix = "HistoryDto"
}

compileJava {
  dependsOn tasks.openApiGenerate
}

sourceSets {
  main {
    java {
      srcDirs += file("$buildDir/openapi/src/main/java")
    }
  }
}

idea {
  module {
    generatedSourceDirs += file("$buildDir/openapi/src/main/java")
  }
}