diff options
Diffstat (limited to 'openapi')
-rw-r--r-- | openapi/build.gradle | 27 | ||||
-rw-r--r-- | openapi/client-portal-history/build.gradle | 30 | ||||
-rw-r--r-- | openapi/client-portal-keycloak/build.gradle | 30 | ||||
-rw-r--r-- | openapi/client-portal-prefs/build.gradle | 30 | ||||
-rw-r--r-- | openapi/server/build.gradle | 4 |
5 files changed, 84 insertions, 37 deletions
diff --git a/openapi/build.gradle b/openapi/build.gradle deleted file mode 100644 index eb39818..0000000 --- a/openapi/build.gradle +++ /dev/null @@ -1,27 +0,0 @@ -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.portalng.bff.openapi.$packageName" - apiPackage = "org.onap.portalng.bff.openapi.${packageName}.api" - modelPackage = "org.onap.portalng.bff.openapi.${packageName}.model" - modelNameSuffix = dtoSuffix - } -} diff --git a/openapi/client-portal-history/build.gradle b/openapi/client-portal-history/build.gradle index 1872713..e692169 100644 --- a/openapi/client-portal-history/build.gradle +++ b/openapi/client-portal-history/build.gradle @@ -1,4 +1,6 @@ -apply plugin: 'org.openapi.generator' +plugins { + id 'org.openapi.generator' +} dependencies { implementation "org.springframework.boot:spring-boot-starter-webflux" @@ -6,8 +8,7 @@ dependencies { } compileJava { - createOpenApiGenerateClientTask(project, "portal_history_openapi.yaml", "client_portal_history", "PortalHistoryDto") - dependsOn = [':openapi:openApiGenerate_client_portal_history'] + dependsOn = ['openApiGenerate_history'] } sourceSets { @@ -23,3 +24,26 @@ idea { generatedSourceDirs += file("$buildDir/openapi/src/main/java") } } + +tasks.register('openApiGenerate_history', org.openapitools.generator.gradle.plugin.tasks.GenerateTask) { + generatorName = "java" + library = "webclient" + inputSpec = "${project.projectDir}/src/portal_history_openapi.yaml" + outputDir = "${project.buildDir}/openapi" + 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.portalng.bff.openapi.client_portal_history" + apiPackage = "org.onap.portalng.bff.openapi.client_portal_history.api" + modelPackage = "org.onap.portalng.bff.openapi.client_portal_history.model" + modelNameSuffix = "PortalHistoryDto" +}
\ No newline at end of file diff --git a/openapi/client-portal-keycloak/build.gradle b/openapi/client-portal-keycloak/build.gradle index f01cf4b..525fa18 100644 --- a/openapi/client-portal-keycloak/build.gradle +++ b/openapi/client-portal-keycloak/build.gradle @@ -1,4 +1,6 @@ -apply plugin: 'org.openapi.generator' +plugins { + id 'org.openapi.generator' +} dependencies { implementation "org.springframework.boot:spring-boot-starter-webflux" @@ -6,8 +8,7 @@ dependencies { } compileJava { - createOpenApiGenerateClientTask(project, "portal_keycloak_openapi.yaml", "client_portal_keycloak", "KeycloakDto") - dependsOn = [':openapi:openApiGenerate_client_portal_keycloak'] + dependsOn = ['openApiGenerate_keycloak'] } sourceSets { @@ -23,3 +24,26 @@ idea { generatedSourceDirs += file("$buildDir/openapi/src/main/java") } } + +tasks.register('openApiGenerate_keycloak', org.openapitools.generator.gradle.plugin.tasks.GenerateTask) { + generatorName = "java" + library = "webclient" + inputSpec = "${project.projectDir}/src/portal_keycloak_openapi.yaml" + outputDir = "${buildDir}/openapi" + 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.portalng.bff.openapi.client_portal_keycloak" + apiPackage = "org.onap.portalng.bff.openapi.client_portal_keycloak.api" + modelPackage = "org.onap.portalng.bff.openapi.client_portal_keycloak.model" + modelNameSuffix = "KeycloakDto" +}
\ No newline at end of file diff --git a/openapi/client-portal-prefs/build.gradle b/openapi/client-portal-prefs/build.gradle index 5201737..cb7122a 100644 --- a/openapi/client-portal-prefs/build.gradle +++ b/openapi/client-portal-prefs/build.gradle @@ -1,4 +1,6 @@ -apply plugin: 'org.openapi.generator' +plugins { + id 'org.openapi.generator' +} dependencies { implementation "org.springframework.boot:spring-boot-starter-webflux" @@ -6,8 +8,7 @@ dependencies { } compileJava { - createOpenApiGenerateClientTask(project, "portal_prefs_openapi.yaml", "client_portal_prefs", "PortalPrefsDto") - dependsOn = [':openapi:openApiGenerate_client_portal_prefs'] + dependsOn = ['openApiGenerate_preferences'] } sourceSets { @@ -23,3 +24,26 @@ idea { generatedSourceDirs += file("$buildDir/openapi/src/main/java") } } + +tasks.register('openApiGenerate_preferences', org.openapitools.generator.gradle.plugin.tasks.GenerateTask) { + generatorName = "java" + library = "webclient" + inputSpec = "${project.projectDir}/src/portal_prefs_openapi.yaml" + outputDir = "${project.buildDir}/openapi" + 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.portalng.bff.openapi.client_portal_prefs" + apiPackage = "org.onap.portalng.bff.openapi.client_portal_prefs.api" + modelPackage = "org.onap.portalng.bff.openapi.client_portal_prefs.model" + modelNameSuffix = "PortalPrefsDto" +}
\ No newline at end of file diff --git a/openapi/server/build.gradle b/openapi/server/build.gradle index f351a5c..6cdc456 100644 --- a/openapi/server/build.gradle +++ b/openapi/server/build.gradle @@ -1,4 +1,6 @@ -apply plugin: 'org.openapi.generator' +plugins { + id 'org.openapi.generator' +} dependencies { implementation "org.springframework.boot:spring-boot-starter-webflux" |