aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/src/main/java/org/onap/portal/history/controller/ActionsController.java2
-rw-r--r--openapi/build.gradle29
-rw-r--r--openapi/src/main/resources/api/api.yml6
-rw-r--r--settings.gradle2
4 files changed, 21 insertions, 18 deletions
diff --git a/app/src/main/java/org/onap/portal/history/controller/ActionsController.java b/app/src/main/java/org/onap/portal/history/controller/ActionsController.java
index 9fd9f79..ab59806 100644
--- a/app/src/main/java/org/onap/portal/history/controller/ActionsController.java
+++ b/app/src/main/java/org/onap/portal/history/controller/ActionsController.java
@@ -79,7 +79,7 @@ public class ActionsController implements ActionsApi {
}
@Override
- public Mono<ResponseEntity<ActionsListResponse>> listActions(String xRequestId, @Valid Optional<@Min(1) Integer> page, @Valid Optional<@Min(1) @Max(5000) Integer> pageSize, @Valid Optional<Integer> showLastHours, ServerWebExchange exchange) {
+ public Mono<ResponseEntity<ActionsListResponse>> listActions(String xRequestId, Optional<Integer> page, Optional<Integer> pageSize, Optional<Integer> showLastHours, ServerWebExchange exchange) {
return actionsService
.listActions(page.orElse(1), pageSize.orElse(10), showLastHours.orElse(portalHistoryConfig.getSaveInterval()), portalHistoryConfig.getSaveInterval(), xRequestId)
diff --git a/openapi/build.gradle b/openapi/build.gradle
index 505ac7b..63c32b5 100644
--- a/openapi/build.gradle
+++ b/openapi/build.gradle
@@ -4,14 +4,20 @@ plugins {
}
ext {
- openapiVersion = '6.0.1'
+ openapiVersion = '6.6.0'
}
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"
+
+ constraints {
+ implementation('io.swagger.core.v3:swagger-annotations:2.2.5') {
+ because 'there is a dependency conflict between swagger-parser versions 2 and 3 (https://github.com/OpenAPITools/openapi-generator/issues/14901)'
+ }
+ implementation('javax.validation:validation-api:2.0.1.Final') {
+ because 'because min max validation wouldnt work with older version of dependency'
+ }
+ }
}
// https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator-gradle-plugin/README.adoc
@@ -21,13 +27,14 @@ openApiGenerate {
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"
+ hideGenerationTimestamp: "true",
+ openApiNullable: "false",
+ skipDefaultInterface: "true",
+ dateLibrary: "java8",
+ interfaceOnly: "true",
+ useTags: "true",
+ useOptional: "true",
+ reactive: "true"
]
generateApiTests = false
generateApiDocumentation = false
diff --git a/openapi/src/main/resources/api/api.yml b/openapi/src/main/resources/api/api.yml
index 1ab2d86..968a6f1 100644
--- a/openapi/src/main/resources/api/api.yml
+++ b/openapi/src/main/resources/api/api.yml
@@ -4,11 +4,7 @@ info:
version: '1.0'
description: API to provide actions for portal-history
servers:
- - url: 'http://localhost:9002/{base}'
- variables:
- base:
- default: 'portal-history'
- description: Basepath
+ - url: 'http://localhost:9002'
tags:
- name: actions
paths:
diff --git a/settings.gradle b/settings.gradle
index 9ac026b..45322ff 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -6,7 +6,7 @@ pluginManagement {
id 'io.spring.dependency-management' version '1.0.13.RELEASE'
id 'org.sonarqube' version '3.4.0.2513'
id 'com.github.hierynomus.license' version '0.16.1'
- id 'org.openapi.generator' version '6.0.1'
+ id 'org.openapi.generator' version '6.6.0'
id 'com.gorylenko.gradle-git-properties' version '2.4.1'
}
// https://docs.gradle.org/current/userguide/plugins.html#sec:custom_plugin_repositories