Skip to content

Commit

Permalink
Merge pull request #352 from bcgov/feature/redis-update
Browse files Browse the repository at this point in the history
Update generated source move away from glassfish
  • Loading branch information
TayGov authored Sep 25, 2023
2 parents 95d67cf + 4ec87d6 commit ad271e0
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/backend/libs/ai-bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<org.apache.cxf.version>4.0.1</org.apache.cxf.version>
<org.apache.tika.version>1.24.1</org.apache.tika.version>
<org.codehaus.janino>3.1.3</org.codehaus.janino>
<org.glassfish.jersey.inject.version>2.32</org.glassfish.jersey.inject.version>
<org.glassfish.jersey.inject.version>3.1.3</org.glassfish.jersey.inject.version>
<org.junit.jupiter.version>5.7.1</org.junit.jupiter.version>
<org.mapstruct.version>1.4.2.Final</org.mapstruct.version>
<org.mockito.mockito-all.version>1.10.19</org.mockito.mockito-all.version>
Expand Down
28 changes: 26 additions & 2 deletions src/backend/libs/ai-diligen-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,31 @@
<groupId>org.json</groupId>
<artifactId>json</artifactId>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.10.1</version>
</dependency>
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>okhttp</artifactId>
<version>4.11.0</version>
</dependency>
<dependency>
<groupId>com.squareup.okio</groupId>
<artifactId>okio</artifactId>
<version>3.5.0</version>
</dependency>
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>logging-interceptor</artifactId>
<version>4.11.0</version>
</dependency>
<dependency>
<groupId>io.gsonfire</groupId>
<artifactId>gson-fire</artifactId>
<version>1.8.5</version>
</dependency>

</dependencies>

Expand Down Expand Up @@ -195,7 +220,6 @@
<generatorName>java</generatorName>
<configOptions>
<disallowAdditionalPropertiesIfNotPresent>false</disallowAdditionalPropertiesIfNotPresent>
<dateLibrary>joda</dateLibrary>
<validateSpec>false</validateSpec>

<!-- javax.* to jakarta.* -->
Expand All @@ -204,7 +228,7 @@

<additionalModelTypeAnnotations>@com.fasterxml.jackson.annotation.JsonIgnoreProperties(ignoreUnknown = true)</additionalModelTypeAnnotations>
</configOptions>
<library>jersey2</library>

<apiPackage>${default-package}.api</apiPackage>
<modelPackage>${default-package}.api.model</modelPackage>
<invokerPackage>${default-package}.api.handler</invokerPackage>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import ca.bc.gov.open.jag.aidiligenclient.api.model.Field;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.PropertyNamingStrategy;
import com.fasterxml.jackson.databind.node.ObjectNode;
import org.json.JSONException;
import org.json.JSONObject;
Expand Down Expand Up @@ -39,8 +40,10 @@ public void testProduct() throws IOException, JSONException {

ObjectMapper mapper = new ObjectMapper();

DocumentConfig formData = mapper.readValue(new String(Files.readAllBytes(path)), DocumentConfig.class);

DocumentConfig formData = mapper.readValue(new String(Files.readAllBytes(path)), DocumentConfig.class);
//Different structure require a different naming strategy
mapper.setPropertyNamingStrategy(PropertyNamingStrategy.SNAKE_CASE);
List<Field> response = mapper.readValue(new String(
Files.readAllBytes(path2)), new TypeReference<List<Field>>(){});

Expand Down

0 comments on commit ad271e0

Please sign in to comment.