From 73fe467c6ffd47fe7391fe93fa08e81bd2b3b62f Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Mon, 22 Nov 2021 20:58:56 +0000 Subject: [PATCH 1/7] [version bump] new dev version --- boat-engine/pom.xml | 2 +- boat-maven-plugin/pom.xml | 2 +- boat-quay/boat-quay-lint/pom.xml | 2 +- boat-quay/boat-quay-rules/pom.xml | 2 +- boat-quay/pom.xml | 2 +- boat-scaffold/pom.xml | 4 ++-- boat-terminal/pom.xml | 2 +- boat-trail-resources/pom.xml | 2 +- pom.xml | 2 +- tests/pom.xml | 2 +- 10 files changed, 11 insertions(+), 11 deletions(-) diff --git a/boat-engine/pom.xml b/boat-engine/pom.xml index cced368fe..1f82590c1 100644 --- a/boat-engine/pom.xml +++ b/boat-engine/pom.xml @@ -5,7 +5,7 @@ com.backbase.oss backbase-openapi-tools - 0.15.1-SNAPSHOT + 0.15.2-SNAPSHOT boat-engine jar diff --git a/boat-maven-plugin/pom.xml b/boat-maven-plugin/pom.xml index 349e6c1f6..3dbce44bc 100644 --- a/boat-maven-plugin/pom.xml +++ b/boat-maven-plugin/pom.xml @@ -5,7 +5,7 @@ com.backbase.oss backbase-openapi-tools - 0.15.1-SNAPSHOT + 0.15.2-SNAPSHOT boat-maven-plugin diff --git a/boat-quay/boat-quay-lint/pom.xml b/boat-quay/boat-quay-lint/pom.xml index 5bdcbd90b..d8c53bf22 100644 --- a/boat-quay/boat-quay-lint/pom.xml +++ b/boat-quay/boat-quay-lint/pom.xml @@ -5,7 +5,7 @@ com.backbase.oss boat-quay - 0.15.1-SNAPSHOT + 0.15.2-SNAPSHOT boat-quay-lint jar diff --git a/boat-quay/boat-quay-rules/pom.xml b/boat-quay/boat-quay-rules/pom.xml index c4b218516..4f10fc865 100644 --- a/boat-quay/boat-quay-rules/pom.xml +++ b/boat-quay/boat-quay-rules/pom.xml @@ -5,7 +5,7 @@ com.backbase.oss boat-quay - 0.15.1-SNAPSHOT + 0.15.2-SNAPSHOT boat-quay-rules jar diff --git a/boat-quay/pom.xml b/boat-quay/pom.xml index b6837e318..532424b9c 100644 --- a/boat-quay/pom.xml +++ b/boat-quay/pom.xml @@ -5,7 +5,7 @@ com.backbase.oss backbase-openapi-tools - 0.15.1-SNAPSHOT + 0.15.2-SNAPSHOT diff --git a/boat-scaffold/pom.xml b/boat-scaffold/pom.xml index 0cd8120a5..c2a9b9d52 100644 --- a/boat-scaffold/pom.xml +++ b/boat-scaffold/pom.xml @@ -5,7 +5,7 @@ com.backbase.oss backbase-openapi-tools - 0.15.1-SNAPSHOT + 0.15.2-SNAPSHOT boat-scaffold @@ -86,7 +86,7 @@ com.backbase.oss boat-trail-resources - 0.15.1-SNAPSHOT + 0.15.2-SNAPSHOT test diff --git a/boat-terminal/pom.xml b/boat-terminal/pom.xml index c72d42230..5d215be24 100644 --- a/boat-terminal/pom.xml +++ b/boat-terminal/pom.xml @@ -5,7 +5,7 @@ com.backbase.oss backbase-openapi-tools - 0.15.1-SNAPSHOT + 0.15.2-SNAPSHOT boat-terminal diff --git a/boat-trail-resources/pom.xml b/boat-trail-resources/pom.xml index 5df6f372e..0aba2b17a 100644 --- a/boat-trail-resources/pom.xml +++ b/boat-trail-resources/pom.xml @@ -5,7 +5,7 @@ com.backbase.oss backbase-openapi-tools - 0.15.1-SNAPSHOT + 0.15.2-SNAPSHOT boat-trail-resources diff --git a/pom.xml b/pom.xml index 7d35b9598..9b7944dea 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.backbase.oss backbase-openapi-tools - 0.15.1-SNAPSHOT + 0.15.2-SNAPSHOT pom Backbase Open Api Tools will help you converting RAML to OpenAPI plus many more diff --git a/tests/pom.xml b/tests/pom.xml index a0b226d35..f4bd91818 100644 --- a/tests/pom.xml +++ b/tests/pom.xml @@ -5,7 +5,7 @@ com.backbase.oss backbase-openapi-tools - 0.15.1-SNAPSHOT + 0.15.2-SNAPSHOT tests From 5421c39b1d02f5a99435a0a1b64a69dd5995b6eb Mon Sep 17 00:00:00 2001 From: Wojciech Romanek Date: Wed, 27 Oct 2021 12:51:05 +0200 Subject: [PATCH 2/7] Fix: do not log warning for absolute file paths passed for linting. --- README.md | 3 +++ .../com/backbase/oss/boat/quay/BoatLinter.java | 5 +++++ .../oss/boat/quay/BoatLinterTests.java | 18 +++++++++++++++++- 3 files changed, 25 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 0c6942c5f..4dbaf513b 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,9 @@ The project is very much Work In Progress and will be published on maven central # Release Notes BOAT is still under development and subject to change. +## 0.15.2 +* *Maven Plugin* + * Fixed handling of absolute file paths for linting OpenAPI specs ## 0.15.1 * *Maven Plugin* * Made `boat:radio` goal properties w.r.t boat-bay server unique. diff --git a/boat-quay/boat-quay-lint/src/main/java/com/backbase/oss/boat/quay/BoatLinter.java b/boat-quay/boat-quay-lint/src/main/java/com/backbase/oss/boat/quay/BoatLinter.java index b11c42f16..757b245a3 100644 --- a/boat-quay/boat-quay-lint/src/main/java/com/backbase/oss/boat/quay/BoatLinter.java +++ b/boat-quay/boat-quay-lint/src/main/java/com/backbase/oss/boat/quay/BoatLinter.java @@ -62,6 +62,11 @@ public BoatLintReport lint(File inputFile) throws IOException, OpenAPILoaderExce @NotNull private Path getFilePath(File inputFile) { File workingDirectory = new File("."); + + if (inputFile.isAbsolute()) { + workingDirectory = workingDirectory.getAbsoluteFile(); + } + Path relativize; try { relativize = workingDirectory.toPath().relativize(inputFile.toPath()); diff --git a/boat-quay/boat-quay-lint/src/test/java/com/backbase/oss/boat/quay/BoatLinterTests.java b/boat-quay/boat-quay-lint/src/test/java/com/backbase/oss/boat/quay/BoatLinterTests.java index e27b1fdbf..9639fefa2 100644 --- a/boat-quay/boat-quay-lint/src/test/java/com/backbase/oss/boat/quay/BoatLinterTests.java +++ b/boat-quay/boat-quay-lint/src/test/java/com/backbase/oss/boat/quay/BoatLinterTests.java @@ -1,5 +1,9 @@ package com.backbase.oss.boat.quay; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; + import com.backbase.oss.boat.loader.OpenAPILoaderException; import com.backbase.oss.boat.quay.model.BoatLintReport; import com.backbase.oss.boat.quay.model.BoatLintRule; @@ -11,7 +15,6 @@ import java.util.List; import java.util.Optional; import org.apache.commons.io.IOUtils; -import static org.junit.jupiter.api.Assertions.*; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -55,6 +58,19 @@ void testRulesWithFile() throws IOException, OpenAPILoaderException { assertTrue(boatLintReport.hasViolations()); } + @Test + void testRulesWithFile_absolutePath() throws IOException, OpenAPILoaderException { + // Can't ret relative file from class path resources. Copy into new file + String openApiContents = IOUtils.resourceToString("/openapi/presentation-client-api/openapi.yaml", Charset.defaultCharset()); + + File inputFile = new File("target/openapi.yaml").getAbsoluteFile(); + Files.write(inputFile.toPath(), openApiContents.getBytes()); + + BoatLintReport boatLintReport = boatLinter.lint(inputFile); + + assertTrue(boatLintReport.hasViolations()); + } + @Test void ruleManager() { List availableRules = boatLinter.getAvailableRules(); From 681c19e4048ec8205901feeb5c1c13643f14193d Mon Sep 17 00:00:00 2001 From: dhananjay12 Date: Sun, 28 Nov 2021 21:58:47 +0100 Subject: [PATCH 3/7] date fix --- boat-maven-plugin/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/boat-maven-plugin/pom.xml b/boat-maven-plugin/pom.xml index 3dbce44bc..c95b9baaa 100644 --- a/boat-maven-plugin/pom.xml +++ b/boat-maven-plugin/pom.xml @@ -357,7 +357,7 @@ com.backbase.oss.boat.bay.client.model com.backbase.oss.boat.bay.client.api feign - java8-localdatetime + java8 @lombok.AllArgsConstructor @lombok.Builder @lombok.NoArgsConstructor From f62a87c5abec0af1adbe6ad7877f6bb4513dff01 Mon Sep 17 00:00:00 2001 From: dhananjay12 Date: Mon, 29 Nov 2021 09:49:41 +0100 Subject: [PATCH 4/7] readme --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 0c6942c5f..3d25d3533 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,9 @@ The project is very much Work In Progress and will be published on maven central # Release Notes BOAT is still under development and subject to change. +## 0.15.2 +* *Maven Plugin* + * Changed boat-bay dateLibrary for upload spec . ## 0.15.1 * *Maven Plugin* * Made `boat:radio` goal properties w.r.t boat-bay server unique. From facb8621fa5ed8651352efe145d7e6f31b59d8ae Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Mon, 29 Nov 2021 12:41:54 +0000 Subject: [PATCH 5/7] [version bump] new dev version --- boat-engine/pom.xml | 2 +- boat-maven-plugin/pom.xml | 2 +- boat-quay/boat-quay-lint/pom.xml | 2 +- boat-quay/boat-quay-rules/pom.xml | 2 +- boat-quay/pom.xml | 2 +- boat-scaffold/pom.xml | 4 ++-- boat-terminal/pom.xml | 2 +- boat-trail-resources/pom.xml | 2 +- pom.xml | 2 +- tests/pom.xml | 2 +- 10 files changed, 11 insertions(+), 11 deletions(-) diff --git a/boat-engine/pom.xml b/boat-engine/pom.xml index 1f82590c1..b0275aabf 100644 --- a/boat-engine/pom.xml +++ b/boat-engine/pom.xml @@ -5,7 +5,7 @@ com.backbase.oss backbase-openapi-tools - 0.15.2-SNAPSHOT + 0.15.3-SNAPSHOT boat-engine jar diff --git a/boat-maven-plugin/pom.xml b/boat-maven-plugin/pom.xml index c95b9baaa..6084b6773 100644 --- a/boat-maven-plugin/pom.xml +++ b/boat-maven-plugin/pom.xml @@ -5,7 +5,7 @@ com.backbase.oss backbase-openapi-tools - 0.15.2-SNAPSHOT + 0.15.3-SNAPSHOT boat-maven-plugin diff --git a/boat-quay/boat-quay-lint/pom.xml b/boat-quay/boat-quay-lint/pom.xml index d8c53bf22..64b2d554c 100644 --- a/boat-quay/boat-quay-lint/pom.xml +++ b/boat-quay/boat-quay-lint/pom.xml @@ -5,7 +5,7 @@ com.backbase.oss boat-quay - 0.15.2-SNAPSHOT + 0.15.3-SNAPSHOT boat-quay-lint jar diff --git a/boat-quay/boat-quay-rules/pom.xml b/boat-quay/boat-quay-rules/pom.xml index 4f10fc865..f562923f4 100644 --- a/boat-quay/boat-quay-rules/pom.xml +++ b/boat-quay/boat-quay-rules/pom.xml @@ -5,7 +5,7 @@ com.backbase.oss boat-quay - 0.15.2-SNAPSHOT + 0.15.3-SNAPSHOT boat-quay-rules jar diff --git a/boat-quay/pom.xml b/boat-quay/pom.xml index 532424b9c..1a13a650a 100644 --- a/boat-quay/pom.xml +++ b/boat-quay/pom.xml @@ -5,7 +5,7 @@ com.backbase.oss backbase-openapi-tools - 0.15.2-SNAPSHOT + 0.15.3-SNAPSHOT diff --git a/boat-scaffold/pom.xml b/boat-scaffold/pom.xml index c2a9b9d52..546e599ed 100644 --- a/boat-scaffold/pom.xml +++ b/boat-scaffold/pom.xml @@ -5,7 +5,7 @@ com.backbase.oss backbase-openapi-tools - 0.15.2-SNAPSHOT + 0.15.3-SNAPSHOT boat-scaffold @@ -86,7 +86,7 @@ com.backbase.oss boat-trail-resources - 0.15.2-SNAPSHOT + 0.15.3-SNAPSHOT test diff --git a/boat-terminal/pom.xml b/boat-terminal/pom.xml index 5d215be24..ef73ac21e 100644 --- a/boat-terminal/pom.xml +++ b/boat-terminal/pom.xml @@ -5,7 +5,7 @@ com.backbase.oss backbase-openapi-tools - 0.15.2-SNAPSHOT + 0.15.3-SNAPSHOT boat-terminal diff --git a/boat-trail-resources/pom.xml b/boat-trail-resources/pom.xml index 0aba2b17a..a3fea60ef 100644 --- a/boat-trail-resources/pom.xml +++ b/boat-trail-resources/pom.xml @@ -5,7 +5,7 @@ com.backbase.oss backbase-openapi-tools - 0.15.2-SNAPSHOT + 0.15.3-SNAPSHOT boat-trail-resources diff --git a/pom.xml b/pom.xml index 9b7944dea..d3be6d8df 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.backbase.oss backbase-openapi-tools - 0.15.2-SNAPSHOT + 0.15.3-SNAPSHOT pom Backbase Open Api Tools will help you converting RAML to OpenAPI plus many more diff --git a/tests/pom.xml b/tests/pom.xml index f4bd91818..a3a64fa8e 100644 --- a/tests/pom.xml +++ b/tests/pom.xml @@ -5,7 +5,7 @@ com.backbase.oss backbase-openapi-tools - 0.15.2-SNAPSHOT + 0.15.3-SNAPSHOT tests From 1ec0bea7ce9a0dcc756fa9d6955d00fc4aed3017 Mon Sep 17 00:00:00 2001 From: Piotr Marat Date: Wed, 22 Dec 2021 05:13:38 +0100 Subject: [PATCH 6/7] Fixed query param mapping for Maps. --- .../boat-java/libraries/resttemplate/ApiClient.mustache | 9 +++++++++ .../boat-java/libraries/webclient/ApiClient.mustache | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/boat-scaffold/src/main/templates/boat-java/libraries/resttemplate/ApiClient.mustache b/boat-scaffold/src/main/templates/boat-java/libraries/resttemplate/ApiClient.mustache index 6201bc6e6..cbb9232b3 100644 --- a/boat-scaffold/src/main/templates/boat-java/libraries/resttemplate/ApiClient.mustache +++ b/boat-scaffold/src/main/templates/boat-java/libraries/resttemplate/ApiClient.mustache @@ -492,6 +492,15 @@ public class ApiClient { collectionFormat = CollectionFormat.CSV; } + if (value instanceof Map) { + Map map = (Map) value; + + for (Object key : map.keySet()) { + params.add(parameterToString(key), parameterToString(map.get(key))); + } + return params; + } + Collection valueCollection = null; if (value instanceof Collection) { valueCollection = (Collection) value; diff --git a/boat-scaffold/src/main/templates/boat-java/libraries/webclient/ApiClient.mustache b/boat-scaffold/src/main/templates/boat-java/libraries/webclient/ApiClient.mustache index 72b80bac8..1b22c2427 100644 --- a/boat-scaffold/src/main/templates/boat-java/libraries/webclient/ApiClient.mustache +++ b/boat-scaffold/src/main/templates/boat-java/libraries/webclient/ApiClient.mustache @@ -382,6 +382,15 @@ public class ApiClient { collectionFormat = CollectionFormat.CSV; } + if (value instanceof Map) { + Map map = (Map) value; + + for (Object key : map.keySet()) { + params.add(parameterToString(key), parameterToString(map.get(key))); + } + return params; + } + Collection valueCollection = null; if (value instanceof Collection) { valueCollection = (Collection) value; From 95b3e0b06ce67489090fa29e3f282e1065d3c610 Mon Sep 17 00:00:00 2001 From: Bart Veenstra Date: Wed, 22 Dec 2021 10:58:50 +0100 Subject: [PATCH 7/7] Update README.md --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 492ba37cd..cebc445f3 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,9 @@ The project is very much Work In Progress and will be published on maven central # Release Notes BOAT is still under development and subject to change. +## 0.15.3 +* *Boat Scaffold* + * A fix for mapping of Map for query params (in client code). ## 0.15.2 * *Maven Plugin* * Fixed handling of absolute file paths for linting OpenAPI specs