Skip to content

Commit

Permalink
feature: provide jackson jq extra as an independent module (quarkiver…
Browse files Browse the repository at this point in the history
  • Loading branch information
Jiehong committed Jan 9, 2023
1 parent d5e5f7e commit 0581003
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 2 deletions.
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ integrate it in your Quarkus application!
Simply add the dependency to your Quarkus project:

```xml

<dependency>
<groupId>io.quarkiverse.jackson-jq</groupId>
<artifactId>quarkus-jackson-jq</artifactId>
Expand Down Expand Up @@ -45,6 +44,17 @@ public class JacksonJqResource {
}
```

## Jackson Jq Extra Module

You can also make use of the [extra module](https://github.com/eiiches/jackson-jq#using-jackson-jqextras-module) by
adding the following dependency:

```xml
<dependency>
<groupId>io.quarkiverse.jackson-jq</groupId>
<artifactId>quarkus-jackson-jq-extra</artifactId>
</dependency>
```

## Adding Custom functions

Expand Down
5 changes: 5 additions & 0 deletions deployment/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@
<artifactId>quarkus-jackson-jq</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>io.quarkiverse.jackson-jq</groupId>
<artifactId>quarkus-jackson-jq-extra</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-junit5-internal</artifactId>
Expand Down
5 changes: 5 additions & 0 deletions integration-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@
<artifactId>quarkus-jackson-jq</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>io.quarkiverse.jackson-jq</groupId>
<artifactId>quarkus-jackson-jq-extra</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-junit5</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,14 @@ public void functionsTest() {
.body("$", hasItem("paths/1")) // built-in function not filtered
.body("$", hasItem("delpaths/1")) // built-in function not filtered
.body("$", hasItem("myFunction/1")) // custom function not filtered
.body("$", hasItem("myFunction/2")); // custom function not filtered
.body("$", hasItem("myFunction/2")) // custom function not filtered
.body("$", hasItem("strftime/1")) // extra function not filtered
.body("$", hasItem("strftime/2")) // extra function not filtered
.body("$", hasItem("uridecode/0")) // extra function not filtered
.body("$", hasItem("uriparse/0")) // extra function not filtered
.body("$", hasItem("strptime/1")) // extra function not filtered
.body("$", hasItem("strptime/2")) // extra function not filtered
.body("$", hasItem("timestamp/0")) // extra function not filtered
.body("$", hasItem("uuid4/0")); // extra function not filtered
}
}
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
<modules>
<module>deployment</module>
<module>runtime</module>
<module>runtime-extra</module>
</modules>
<properties>
<compiler-plugin.version>3.8.1</compiler-plugin.version>
Expand Down
19 changes: 19 additions & 0 deletions runtime-extra/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>io.quarkiverse.jackson-jq</groupId>
<artifactId>quarkus-jackson-jq-parent</artifactId>
<version>1.2.0-SNAPSHOT</version>
</parent>
<artifactId>quarkus-jackson-jq-extra</artifactId>
<name>Quarkus - Jackson Jq - Runtime - Extra</name>
<dependencies>
<dependency>
<groupId>net.thisptr</groupId>
<artifactId>jackson-jq-extra</artifactId>
<type>jar</type>
<version>${jackson-jq.version}</version>
</dependency>
</dependencies>
</project>

0 comments on commit 0581003

Please sign in to comment.