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
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ 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.14.10
* *Boat Scaffold*
* Makes sure to URLDecode paths while dereferencing examples
## 0.14.9
* *Boat Scaffold*
* Resolve references to other path operations' examples

## 0.14.8
* *Boat Marina*
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.14.9</version>
<version>0.14.10-SNAPSHOT</version>
</parent>
<artifactId>boat-engine</artifactId>
<packaging>jar</packaging>
Expand Down
2 changes: 1 addition & 1 deletion 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.14.9</version>
<version>0.14.10-SNAPSHOT</version>
</parent>
<artifactId>boat-maven-plugin</artifactId>

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.14.9</version>
<version>0.14.10-SNAPSHOT</version>
</parent>
<artifactId>boat-quay-lint</artifactId>
<packaging>jar</packaging>
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.14.9</version>
<version>0.14.10-SNAPSHOT</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.14.9</version>
<version>0.14.10-SNAPSHOT</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.14.9</version>
<version>0.14.10-SNAPSHOT</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.14.9</version>
<version>0.14.10-SNAPSHOT</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;

import java.net.URLDecoder;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
Expand Down Expand Up @@ -129,8 +131,9 @@ private static void resolvePathsExamples(
log.warn("Example ref: {} refers to '/paths' but it is not there.", ref);
return;
}

String[] refParts = Arrays.stream(ref.replace(PATHS_REF_PREFIX, "").split("/"))
.map(s -> s.replace("~1", "/"))
.map(s -> URLDecoder.decode(s.replace("~1", "/").replace("~0", "~"), StandardCharsets.UTF_8))
.toArray(String[]::new);

String pathName = refParts[1];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,14 @@ paths:
$ref: "#/components/schemas/Error"
example:
$ref: "#/components/examples/InternalServerError"
'400':
description: InternalServerError
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
example:
$ref: "#/paths/~1pets~1%7BpetId%7D/get/responses/default/content/application~1json/example"
default:
description: unexpected error
content:
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.14.9</version>
<version>0.14.10-SNAPSHOT</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.14.9</version>
<version>0.14.10-SNAPSHOT</version>
</parent>
<artifactId>boat-trail-resources</artifactId>

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

<groupId>com.backbase.oss</groupId>
<artifactId>backbase-openapi-tools</artifactId>
<version>0.14.9</version>
<version>0.14.10-SNAPSHOT</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.14.9</version>
<version>0.14.10-SNAPSHOT</version>
</parent>

<artifactId>tests</artifactId>
Expand Down