Skip to content

Commit

Permalink
Merge branch 'dev' into DT-786
Browse files Browse the repository at this point in the history
preetamnpr committed Feb 29, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
2 parents 0e52833 + c78ca69 commit 2f55330
Showing 86 changed files with 7,643 additions and 188 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/master.yml
Original file line number Diff line number Diff line change
@@ -26,7 +26,7 @@ jobs:
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 17
java-version: 21
cache: 'maven'

- name: Build Conformance-Gateway
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
FROM maven:3.8.5-openjdk-17-slim as builder
FROM maven:3.9.6-eclipse-temurin-21-alpine as builder

WORKDIR /build

COPY . .

RUN mvn install -DskipTests -U -B

FROM openjdk:17-alpine3.14
FROM eclipse-temurin:21

EXPOSE 8080

VOLUME /tmp

COPY --from=builder /build/spring-boot/target/*.jar app.jar
ENTRYPOINT ["java","-jar","/app.jar"]
ENTRYPOINT ["java", "-jar", "/app.jar"]
8 changes: 4 additions & 4 deletions booking/pom.xml
Original file line number Diff line number Diff line change
@@ -8,9 +8,9 @@
<name>dcsa-conformance-booking</name>
<description>DCSA Conformance Booking</description>
<properties>
<java.version>17</java.version>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<java.version>21</java.version>
<maven.compiler.source>21</maven.compiler.source>
<maven.compiler.target>21</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
@@ -23,7 +23,7 @@
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.28</version>
<version>1.18.30</version>
<optional>true</optional>
</dependency>
<!-- https://mvnrepository.com/artifact/com.networknt/json-schema-validator -->
15 changes: 7 additions & 8 deletions cdk/pom.xml
Original file line number Diff line number Diff line change
@@ -9,7 +9,6 @@
<description>DCSA Conformance CDK</description>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<cdk.version>2.94.0</cdk.version>
<junit.version>5.10.0</junit.version>
</properties>
<build>
@@ -19,8 +18,8 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>3.10.1</version>
<configuration>
<source>17</source>
<target>17</target>
<source>21</source>
<target>21</target>
</configuration>
</plugin>
<plugin>
@@ -37,29 +36,29 @@
<dependency>
<groupId>software.amazon.awscdk</groupId>
<artifactId>aws-cdk-lib</artifactId>
<version>${cdk.version}</version>
<version>2.130.0</version>
</dependency>

<dependency>
<groupId>software.amazon.awscdk</groupId>
<artifactId>apigatewayv2-authorizers-alpha</artifactId>
<version>2.94.0-alpha.0</version>
<version>2.114.0-alpha.0</version>
</dependency>
<dependency>
<groupId>software.amazon.awscdk</groupId>
<artifactId>apigatewayv2-integrations-alpha</artifactId>
<version>2.94.0-alpha.0</version>
<version>2.114.0-alpha.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/software.amazon.awsconstructs/cloudfronts3 -->
<dependency>
<groupId>software.amazon.awsconstructs</groupId>
<artifactId>cloudfronts3</artifactId>
<version>2.42.0</version>
<version>2.53.0</version>
</dependency>
<dependency>
<groupId>software.constructs</groupId>
<artifactId>constructs</artifactId>
<version>10.2.70</version>
<version>10.3.0</version>
</dependency>


Original file line number Diff line number Diff line change
@@ -115,7 +115,7 @@ public ConformanceStack(
"/bin/sh",
"-c",
"mvn clean install && cp /asset-input/target/conformance-lambda.jar /asset-output/"))
.image(Runtime.JAVA_17.getBundlingImage())
.image(Runtime.JAVA_21.getBundlingImage())
.volumes(
singletonList(
// Mount local .m2 repo to avoid download all the
@@ -135,7 +135,7 @@ public ConformanceStack(
prefix + "SandboxTaskLambda",
FunctionProps.builder()
.functionName(prefix + "SandboxTaskLambda")
.runtime(Runtime.JAVA_17)
.runtime(Runtime.JAVA_21)
.code(assetCode)
.handler("org.dcsa.conformance.lambda.SandboxTaskLambda")
.memorySize(1024)
@@ -150,7 +150,7 @@ public ConformanceStack(
prefix + "ApiLambda",
FunctionProps.builder()
.functionName(prefix + "ApiLambda")
.runtime(Runtime.JAVA_17)
.runtime(Runtime.JAVA_21)
.code(assetCode)
.handler("org.dcsa.conformance.lambda.ApiLambda")
.memorySize(1024)
@@ -165,7 +165,7 @@ public ConformanceStack(
prefix + "WebuiLambda",
FunctionProps.builder()
.functionName(prefix + "WebuiLambda")
.runtime(Runtime.JAVA_17)
.runtime(Runtime.JAVA_21)
.code(assetCode)
.handler("org.dcsa.conformance.lambda.WebuiLambda")
.memorySize(1024)
8 changes: 4 additions & 4 deletions core/pom.xml
Original file line number Diff line number Diff line change
@@ -8,16 +8,16 @@
<name>dcsa-conformance-core</name>
<description>DCSA Conformance Core</description>
<properties>
<java.version>17</java.version>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<java.version>21</java.version>
<maven.compiler.source>21</maven.compiler.source>
<maven.compiler.target>21</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.28</version>
<version>1.18.30</version>
<optional>true</optional>
</dependency>
<!-- https://mvnrepository.com/artifact/com.networknt/json-schema-validator -->
Original file line number Diff line number Diff line change
@@ -10,6 +10,7 @@
import java.util.stream.Collectors;
import lombok.Getter;
import lombok.SneakyThrows;
import org.apache.commons.text.StringEscapeUtils;
import org.dcsa.conformance.core.check.ConformanceCheck;

import static org.dcsa.conformance.core.toolkit.JsonToolkit.OBJECT_MAPPER;
@@ -147,7 +148,7 @@ private static String scenarioAsHtmlBlock(ConformanceReport report, int level, b
level * 2,
printable ? " open" : "",
getConformanceIcon(report.conformanceStatus),
report.title,
StringEscapeUtils.escapeHtml4(report.title),
getErrors(report),
report.subReports.stream()
.map(subReport -> renderReport(subReport, level + 1, printable))
@@ -160,15 +161,15 @@ private static String scenarioDetailsAsHtmlBlock(ConformanceReport report, int l
.formatted(
level * 2,
getConformanceIcon(report.conformanceStatus),
report.title.trim(),
StringEscapeUtils.escapeHtml4(report.title.trim()),
getConformanceLabel(report.conformanceStatus));
}
return "<div style=\"margin-left: %dem\">%n<details%s><summary>%s %s</summary>%n<div>%s</div>%n%s%n</details></div>%n"
.formatted(
level * 2,
printable ? " open" : "",
getConformanceIcon(report.conformanceStatus),
report.title,
StringEscapeUtils.escapeHtml4(report.title),
getErrors(report),
report.subReports.stream()
.map(subReport -> renderReport(subReport, level + 1, printable))
@@ -179,7 +180,7 @@ private static String scenarioListAsHtmlBlock(ConformanceReport report, int leve
return "<div style=\"margin-left: %dem\">%n<h4>%s</h4>%n<div>%s</div>%n</div>%n%s%n"
.formatted(
level * 2,
report.title,
StringEscapeUtils.escapeHtml4(report.title),
getErrors(report),
report.subReports.stream()
.map(subReport -> renderReport(subReport, level + 1, printable))
@@ -190,7 +191,7 @@ private static String asHtmlBlock(ConformanceReport report, int level, boolean p
return "<div style=\"margin-left: %dem\">%n<h4>%s</h4>%n<div>%s %s %s</div>%n<div>%s</div>%n</div>%n%s%n"
.formatted(
level * 2,
report.title,
StringEscapeUtils.escapeHtml4(report.title),
getConformanceIcon(report.conformanceStatus),
getConformanceLabel(report.conformanceStatus),
getExchangesDetails(report),
@@ -240,6 +241,7 @@ private static String getExchangesDetails(ConformanceReport report) {

private static String getErrors(ConformanceReport report) {
return report.errorMessages.stream()
.map(StringEscapeUtils::escapeHtml4)
.map("\n<div>%s</div>"::formatted)
.collect(Collectors.joining());
}
Original file line number Diff line number Diff line change
@@ -19,7 +19,7 @@ private static class MemoryMapItem {
private final HashMap<String, TreeMap<String, MemoryMapItem>> memoryMap = new HashMap<>();

public MemorySortedPartitionsLockingMap() {
super(5 * 1000, 100, 10 * 1000);
super(60 * 1000, 100, 60 * 1000);
}

private MemoryMapItem _getOrCreateItem(String partitionKey, String sortKey) {
8 changes: 4 additions & 4 deletions ebl-issuance/pom.xml
Original file line number Diff line number Diff line change
@@ -8,9 +8,9 @@
<name>dcsa-conformance-ebl-issuance</name>
<description>DCSA Conformance eBL Issuance</description>
<properties>
<java.version>17</java.version>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<java.version>21</java.version>
<maven.compiler.source>21</maven.compiler.source>
<maven.compiler.target>21</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
@@ -23,7 +23,7 @@
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.28</version>
<version>1.18.30</version>
<optional>true</optional>
</dependency>
<!-- https://mvnrepository.com/artifact/com.networknt/json-schema-validator -->
8 changes: 4 additions & 4 deletions ebl-surrender/pom.xml
Original file line number Diff line number Diff line change
@@ -8,9 +8,9 @@
<name>dcsa-conformance-ebl-surrender</name>
<description>DCSA Conformance eBL Surrender</description>
<properties>
<java.version>17</java.version>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<java.version>21</java.version>
<maven.compiler.source>21</maven.compiler.source>
<maven.compiler.target>21</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
@@ -23,7 +23,7 @@
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.28</version>
<version>1.18.30</version>
<optional>true</optional>
</dependency>
<!-- https://mvnrepository.com/artifact/com.networknt/json-schema-validator -->
8 changes: 4 additions & 4 deletions ebl/pom.xml
Original file line number Diff line number Diff line change
@@ -8,9 +8,9 @@
<name>dcsa-conformance-ebl</name>
<description>DCSA Conformance eBL</description>
<properties>
<java.version>17</java.version>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<java.version>21</java.version>
<maven.compiler.source>21</maven.compiler.source>
<maven.compiler.target>21</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
@@ -23,7 +23,7 @@
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.28</version>
<version>1.18.30</version>
<optional>true</optional>
</dependency>
<!-- https://mvnrepository.com/artifact/com.networknt/json-schema-validator -->
10 changes: 5 additions & 5 deletions lambda/pom.xml
Original file line number Diff line number Diff line change
@@ -8,9 +8,9 @@
<name>dcsa-conformance-lambda</name>
<description>DCSA Conformance Lambda</description>
<properties>
<java.version>17</java.version>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<java.version>21</java.version>
<maven.compiler.source>21</maven.compiler.source>
<maven.compiler.target>21</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

@@ -47,7 +47,7 @@
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-lambda</artifactId>
<version>1.12.552</version>
<version>1.12.665</version>
</dependency>

<dependency>
@@ -65,7 +65,7 @@
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.28</version>
<version>1.18.30</version>
<optional>true</optional>
</dependency>

8 changes: 4 additions & 4 deletions ovs/pom.xml
Original file line number Diff line number Diff line change
@@ -8,9 +8,9 @@
<name>dcsa-conformance-ovs</name>
<description>DCSA Conformance OVS</description>
<properties>
<java.version>17</java.version>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<java.version>21</java.version>
<maven.compiler.source>21</maven.compiler.source>
<maven.compiler.target>21</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
@@ -23,7 +23,7 @@
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.28</version>
<version>1.18.30</version>
<optional>true</optional>
</dependency>
<!-- https://mvnrepository.com/artifact/com.networknt/json-schema-validator -->
Original file line number Diff line number Diff line change
@@ -4,6 +4,8 @@
import java.util.*;
import java.util.function.Function;
import java.util.stream.Collectors;

import lombok.Getter;
import lombok.SneakyThrows;
import org.dcsa.conformance.core.AbstractComponentFactory;
import org.dcsa.conformance.core.check.JsonSchemaValidator;
@@ -20,11 +22,12 @@

public class OvsComponentFactory extends AbstractComponentFactory {
public static final String STANDARD_NAME = "OVS";
public static final List<String> STANDARD_VERSIONS = List.of("3.0.0-Beta1");
public static final List<String> STANDARD_VERSIONS = List.of("3.0.0");

private static final String PUBLISHER_AUTH_HEADER_VALUE = UUID.randomUUID().toString();
private static final String SUBSCRIBER_AUTH_HEADER_VALUE = UUID.randomUUID().toString();

@Getter
private final String standardVersion;

public OvsComponentFactory(String standardVersion) {
@@ -116,7 +119,8 @@ public JsonSchemaValidator getMessageSchemaValidator(String apiProviderRole, boo
String schemaFilePath =
"/standards/ovs/schemas/ovs-%s-%s.json"
.formatted(
standardVersion.startsWith("2") ? "v22" : "v30", apiProviderRole.toLowerCase());
standardVersion.toLowerCase().replaceAll("[.-]", ""),
apiProviderRole.toLowerCase());
String schemaName =
OvsRole.isPublisher(apiProviderRole) ? (forRequest ? null : "serviceSchedules") : null;
return JsonSchemaValidator.getInstance(schemaFilePath, schemaName);
Loading

0 comments on commit 2f55330

Please sign in to comment.