Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ 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
* Changed boat-bay dateLibrary for upload spec .
## 0.15.1
* *Maven Plugin*
* Made `boat:radio` goal properties w.r.t boat-bay server unique.
Expand Down
2 changes: 1 addition & 1 deletion boat-engine/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.backbase.oss</groupId>
<artifactId>backbase-openapi-tools</artifactId>
<version>0.15.1</version>
<version>0.15.2</version>
</parent>
<artifactId>boat-engine</artifactId>
<packaging>jar</packaging>
Expand Down
4 changes: 2 additions & 2 deletions boat-maven-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.backbase.oss</groupId>
<artifactId>backbase-openapi-tools</artifactId>
<version>0.15.1</version>
<version>0.15.2</version>
</parent>
<artifactId>boat-maven-plugin</artifactId>

Expand Down Expand Up @@ -357,7 +357,7 @@
<modelPackage>com.backbase.oss.boat.bay.client.model</modelPackage>
<apiPackage>com.backbase.oss.boat.bay.client.api</apiPackage>
<library>feign</library>
<dateLibrary>java8-localdatetime</dateLibrary>
<dateLibrary>java8</dateLibrary>
<additionalModelTypeAnnotations>@lombok.AllArgsConstructor @lombok.Builder @lombok.NoArgsConstructor</additionalModelTypeAnnotations>
</configOptions>
</configuration>
Expand Down
2 changes: 1 addition & 1 deletion boat-quay/boat-quay-lint/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.backbase.oss</groupId>
<artifactId>boat-quay</artifactId>
<version>0.15.1</version>
<version>0.15.2</version>
</parent>
<artifactId>boat-quay-lint</artifactId>
<packaging>jar</packaging>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -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;

Expand Down Expand Up @@ -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<BoatLintRule> availableRules = boatLinter.getAvailableRules();
Expand Down
2 changes: 1 addition & 1 deletion boat-quay/boat-quay-rules/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.backbase.oss</groupId>
<artifactId>boat-quay</artifactId>
<version>0.15.1</version>
<version>0.15.2</version>
</parent>
<artifactId>boat-quay-rules</artifactId>
<packaging>jar</packaging>
Expand Down
2 changes: 1 addition & 1 deletion boat-quay/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.backbase.oss</groupId>
<artifactId>backbase-openapi-tools</artifactId>
<version>0.15.1</version>
<version>0.15.2</version>
</parent>


Expand Down
4 changes: 2 additions & 2 deletions boat-scaffold/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.backbase.oss</groupId>
<artifactId>backbase-openapi-tools</artifactId>
<version>0.15.1</version>
<version>0.15.2</version>
</parent>
<artifactId>boat-scaffold</artifactId>

Expand Down Expand Up @@ -86,7 +86,7 @@
<dependency>
<groupId>com.backbase.oss</groupId>
<artifactId>boat-trail-resources</artifactId>
<version>0.15.1</version>
<version>0.15.2</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
2 changes: 1 addition & 1 deletion boat-terminal/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.backbase.oss</groupId>
<artifactId>backbase-openapi-tools</artifactId>
<version>0.15.1</version>
<version>0.15.2</version>
</parent>

<artifactId>boat-terminal</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion boat-trail-resources/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.backbase.oss</groupId>
<artifactId>backbase-openapi-tools</artifactId>
<version>0.15.1</version>
<version>0.15.2</version>
</parent>
<artifactId>boat-trail-resources</artifactId>

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>com.backbase.oss</groupId>
<artifactId>backbase-openapi-tools</artifactId>
<version>0.15.1</version>
<version>0.15.2</version>
<packaging>pom</packaging>
<description>Backbase Open Api Tools will help you converting RAML to OpenAPI plus many more</description>

Expand Down
2 changes: 1 addition & 1 deletion tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.backbase.oss</groupId>
<artifactId>backbase-openapi-tools</artifactId>
<version>0.15.1</version>
<version>0.15.2</version>
</parent>

<artifactId>tests</artifactId>
Expand Down