diff --git a/CHANGELOG.md b/CHANGELOG.md
index 74931d6f4..bfc8716fd 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
+- [fj-doc-mod-opencsv] added GraalVM native metadata to csv format
- [fj-doc-native-quarkus] added quarkus integration tests
## [8.10.7] - 2024-11-02
diff --git a/fj-doc-base/README.md b/fj-doc-base/README.md
index f1ef31b3e..46b6d9d71 100644
--- a/fj-doc-base/README.md
+++ b/fj-doc-base/README.md
@@ -16,9 +16,6 @@ All basic features are implemented (plus helpers for other modules).
*Since* : fj-doc 0.1
-*Native support* :
-Enabled since version 1.4.0-rc.001, This module should fully support native image. (*reflect-config.json* and *resources-config.json* have been added and there is no dependent library without native support)
-
*Quickstart* :
This module is based on [DocHandlerFacade](src/main/java/org/fugerit/java/doc/base/facade/DocHandlerFacade.java)
diff --git a/fj-doc-guide/src/main/docs/asciidoc/chapters/00_2_release_notes.adoc b/fj-doc-guide/src/main/docs/asciidoc/chapters/00_2_release_notes.adoc
index 23f762cb1..d741374d0 100644
--- a/fj-doc-guide/src/main/docs/asciidoc/chapters/00_2_release_notes.adoc
+++ b/fj-doc-guide/src/main/docs/asciidoc/chapters/00_2_release_notes.adoc
@@ -3,6 +3,8 @@
Whereas the link:https://github.com/fugerit-org/fj-doc/blob/main/CHANGELOG.md[CHANGELOG] is a detailed list of modification to project, the release notes just refers to most important changes.
+* Native metadata for module fj-doc-mode-opencsv (and relevant tests)
+
[#doc-release-notes-8-10-7]
==== Version 8.10.7 [2024-11-02]
diff --git a/fj-doc-guide/src/main/docs/asciidoc/chapters/00_3_native_support.adoc b/fj-doc-guide/src/main/docs/asciidoc/chapters/00_3_native_support.adoc
index 05125f483..1b35d1a7f 100644
--- a/fj-doc-guide/src/main/docs/asciidoc/chapters/00_3_native_support.adoc
+++ b/fj-doc-guide/src/main/docs/asciidoc/chapters/00_3_native_support.adoc
@@ -5,6 +5,12 @@ The full GraalVM support is currently under development.
xref:#doc-handlers[Modules] with native support are marked as *native ready*.
+Currently *native ready* modules :
+
+. fj-doc-base
+. fj-doc-freemarker
+. fj-doc-mod-opencsv
+
There is a test project link:https://github.com/fugerit-org/fj-doc/tree/main/fj-doc-native-quarkus[fj-doc-native-quarkus]
and a link:https://github.com/fugerit-org/fj-doc/actions/workflows/build_fj-doc-native-quarkus_test.yml[GitHub workflow].
diff --git a/fj-doc-guide/src/main/docs/asciidoc/chapters/06_doc_handlers.adoc b/fj-doc-guide/src/main/docs/asciidoc/chapters/06_doc_handlers.adoc
index 13cce7a04..c9dbeb047 100644
--- a/fj-doc-guide/src/main/docs/asciidoc/chapters/06_doc_handlers.adoc
+++ b/fj-doc-guide/src/main/docs/asciidoc/chapters/06_doc_handlers.adoc
@@ -89,7 +89,7 @@ flowchart TB
| xref:#doc-handler-mod-opencsv[fj-doc-mod-opencsv]
| CSV
| Generates a CSV document using link:https://opencsv.sourceforge.net/[OpenCSV].
-|
+| native ready (1)
| xref:#doc-handler-mod-openpdf-ext-pdf[org.fugerit.java.doc.mod.openpdf.ext.PdfTypeHandler]
| xref:#doc-handler-mod-openpdf-ext[fj-doc-mod-openpdf-ext] | PDF
diff --git a/fj-doc-maven-plugin/src/main/resources/config/template/flavour/quarkus-3/README.ftl b/fj-doc-maven-plugin/src/main/resources/config/template/flavour/quarkus-3/README.ftl
index dc1931a6e..30d8da9a6 100644
--- a/fj-doc-maven-plugin/src/main/resources/config/template/flavour/quarkus-3/README.ftl
+++ b/fj-doc-maven-plugin/src/main/resources/config/template/flavour/quarkus-3/README.ftl
@@ -4,8 +4,8 @@
Requirement :
-- maven 3.9.x
-- java ${context.javaRelease}+
+* maven 3.9.x
+* java ${context.javaRelease}+
1. Start the app
diff --git a/fj-doc-maven-plugin/src/main/resources/config/template/flavour/springboot-3/README.ftl b/fj-doc-maven-plugin/src/main/resources/config/template/flavour/springboot-3/README.ftl
index cf251c118..2162d8a4b 100644
--- a/fj-doc-maven-plugin/src/main/resources/config/template/flavour/springboot-3/README.ftl
+++ b/fj-doc-maven-plugin/src/main/resources/config/template/flavour/springboot-3/README.ftl
@@ -3,8 +3,9 @@
## Quickstart
Requirement :
-- maven 3.9.x
-- java ${context.javaRelease}+
+
+* maven 3.9.x
+* java ${context.javaRelease}+
1. Start the app
diff --git a/fj-doc-mod-opencsv/README.md b/fj-doc-mod-opencsv/README.md
index c1007af65..fab48b5a4 100644
--- a/fj-doc-mod-opencsv/README.md
+++ b/fj-doc-mod-opencsv/README.md
@@ -6,6 +6,7 @@
[](https://mvnrepository.com/artifact/org.fugerit.java/fj-doc-mod-opencsv)
[](https://javadoc.io/doc/org.fugerit.java/fj-doc-mod-opencsv)
+
*Status* :
Basic features implemented. (Sample JUnit [TestFreeMarker01](../fj-doc-sample/src/test/java/test/org/fugerit/java/doc/sample/freemarker/TestFreeMarker01.java) is now working).
@@ -13,9 +14,6 @@ For the intrinsic limitations of the CSV format, is possible to choose a single
*Since* : fj-doc 0.6
-*Native support* :
-Disabled, native support will be added in a future release. OpenCSV native support must be verified.
-
*Quickstart* :
Basically this is only a type handler, see core library [fj-doc-base](../fj-doc-base/README.md).
NOTE: If you have any special need you can open a pull request or create your own handler based on this.
\ No newline at end of file
diff --git a/fj-doc-mod-opencsv/pom.xml b/fj-doc-mod-opencsv/pom.xml
index 5ac0e4aca..6ee428856 100644
--- a/fj-doc-mod-opencsv/pom.xml
+++ b/fj-doc-mod-opencsv/pom.xml
@@ -20,7 +20,52 @@
repo
-
+
+
+
+
+
+
+ org.fugerit.java
+ native-helper-maven-plugin
+ ${native-helper-maven-plugin-version}
+
+
+ generate-native-configuration
+ prepare-package
+
+ generate
+
+
+ true
+ ${project.basedir}/src/main/config/native-helper-config.yaml
+ ${project.build.directory}/generated-resources/reflect-config-custom.json
+ false
+
+
+
+ merge-native-configuration
+ prepare-package
+
+ merge
+
+
+
+ ${project.build.directory}/generated-resources/reflect-config-custom.json
+ ${project.basedir}/src/main/config/reflect-config-nhg.json
+
+ ${project.basedir}/src/main/resources/META-INF/native-image/reflect-config.json
+ true
+ false
+
+
+
+
+
+
+
+
+
diff --git a/fj-doc-mod-opencsv/src/main/config/native-helper-config.yaml b/fj-doc-mod-opencsv/src/main/config/native-helper-config.yaml
new file mode 100644
index 000000000..e966a4051
--- /dev/null
+++ b/fj-doc-mod-opencsv/src/main/config/native-helper-config.yaml
@@ -0,0 +1,6 @@
+#Sample native helper config file
+---
+generate:
+ - packageName: org.fugerit.java.doc.mod.opencsv
+ mode: all
+ typeReachable: org.fugerit.java.doc.base.facade.DocFacadeSource
diff --git a/fj-doc-mod-opencsv/src/main/config/reflect-config-nhg.json b/fj-doc-mod-opencsv/src/main/config/reflect-config-nhg.json
new file mode 100644
index 000000000..2bf9041e5
--- /dev/null
+++ b/fj-doc-mod-opencsv/src/main/config/reflect-config-nhg.json
@@ -0,0 +1,10 @@
+[
+ {
+ "name": "java.lang.Class",
+ "methods": [
+ { "name": "getSimpleName", "parameterTypes": [] },
+ { "name": "getName", "parameterTypes": [] },
+ { "name": "getCanonicalName", "parameterTypes": [] }
+ ]
+ }
+]
\ No newline at end of file
diff --git a/fj-doc-mod-opencsv/src/main/resources/META-INF/native-image/reflect-config.json b/fj-doc-mod-opencsv/src/main/resources/META-INF/native-image/reflect-config.json
new file mode 100644
index 000000000..d0feb649a
--- /dev/null
+++ b/fj-doc-mod-opencsv/src/main/resources/META-INF/native-image/reflect-config.json
@@ -0,0 +1,184 @@
+[ {
+ "condition" : {
+ "typeReachable" : "org.fugerit.java.doc.base.facade.DocFacadeSource"
+ },
+ "name" : "org.fugerit.java.doc.mod.opencsv.OpenCSVTypeHandler",
+ "fields" : [ ],
+ "methods" : [ {
+ "name" : "",
+ "parameterTypes" : [ ]
+ }, {
+ "name" : "",
+ "parameterTypes" : [ "java.nio.charset.Charset" ]
+ }, {
+ "name" : "configure",
+ "parameterTypes" : [ "java.util.Properties" ]
+ }, {
+ "name" : "configure",
+ "parameterTypes" : [ "org.w3c.dom.Element" ]
+ }, {
+ "name" : "configureProperties",
+ "parameterTypes" : [ "java.io.InputStream" ]
+ }, {
+ "name" : "configureXML",
+ "parameterTypes" : [ "java.io.InputStream" ]
+ }, {
+ "name" : "createKey",
+ "parameterTypes" : [ "java.lang.String", "java.lang.String" ]
+ }, {
+ "name" : "equals",
+ "parameterTypes" : [ "java.lang.Object" ]
+ }, {
+ "name" : "getCharset",
+ "parameterTypes" : [ ]
+ }, {
+ "name" : "getClass",
+ "parameterTypes" : [ ]
+ }, {
+ "name" : "getCustomId",
+ "parameterTypes" : [ ]
+ }, {
+ "name" : "getFormat",
+ "parameterTypes" : [ ]
+ }, {
+ "name" : "getKey",
+ "parameterTypes" : [ ]
+ }, {
+ "name" : "getKey",
+ "parameterTypes" : [ ]
+ }, {
+ "name" : "getMime",
+ "parameterTypes" : [ ]
+ }, {
+ "name" : "getModule",
+ "parameterTypes" : [ ]
+ }, {
+ "name" : "getType",
+ "parameterTypes" : [ ]
+ }, {
+ "name" : "handle",
+ "parameterTypes" : [ "org.fugerit.java.doc.base.config.DocInput", "org.fugerit.java.doc.base.config.DocOutput" ]
+ }, {
+ "name" : "hashCode",
+ "parameterTypes" : [ ]
+ }, {
+ "name" : "notify",
+ "parameterTypes" : [ ]
+ }, {
+ "name" : "notifyAll",
+ "parameterTypes" : [ ]
+ }, {
+ "name" : "setCustomId",
+ "parameterTypes" : [ "java.lang.String" ]
+ }, {
+ "name" : "toString",
+ "parameterTypes" : [ ]
+ }, {
+ "name" : "wait",
+ "parameterTypes" : [ ]
+ }, {
+ "name" : "wait",
+ "parameterTypes" : [ "long" ]
+ }, {
+ "name" : "wait",
+ "parameterTypes" : [ "long", "int" ]
+ } ]
+}, {
+ "condition" : {
+ "typeReachable" : "org.fugerit.java.doc.base.facade.DocFacadeSource"
+ },
+ "name" : "org.fugerit.java.doc.mod.opencsv.OpenCSVTypeHandlerUTF8",
+ "fields" : [ ],
+ "methods" : [ {
+ "name" : "",
+ "parameterTypes" : [ ]
+ }, {
+ "name" : "configure",
+ "parameterTypes" : [ "java.util.Properties" ]
+ }, {
+ "name" : "configure",
+ "parameterTypes" : [ "org.w3c.dom.Element" ]
+ }, {
+ "name" : "configureProperties",
+ "parameterTypes" : [ "java.io.InputStream" ]
+ }, {
+ "name" : "configureXML",
+ "parameterTypes" : [ "java.io.InputStream" ]
+ }, {
+ "name" : "createKey",
+ "parameterTypes" : [ "java.lang.String", "java.lang.String" ]
+ }, {
+ "name" : "equals",
+ "parameterTypes" : [ "java.lang.Object" ]
+ }, {
+ "name" : "getCharset",
+ "parameterTypes" : [ ]
+ }, {
+ "name" : "getClass",
+ "parameterTypes" : [ ]
+ }, {
+ "name" : "getCustomId",
+ "parameterTypes" : [ ]
+ }, {
+ "name" : "getFormat",
+ "parameterTypes" : [ ]
+ }, {
+ "name" : "getKey",
+ "parameterTypes" : [ ]
+ }, {
+ "name" : "getKey",
+ "parameterTypes" : [ ]
+ }, {
+ "name" : "getMime",
+ "parameterTypes" : [ ]
+ }, {
+ "name" : "getModule",
+ "parameterTypes" : [ ]
+ }, {
+ "name" : "getType",
+ "parameterTypes" : [ ]
+ }, {
+ "name" : "handle",
+ "parameterTypes" : [ "org.fugerit.java.doc.base.config.DocInput", "org.fugerit.java.doc.base.config.DocOutput" ]
+ }, {
+ "name" : "hashCode",
+ "parameterTypes" : [ ]
+ }, {
+ "name" : "notify",
+ "parameterTypes" : [ ]
+ }, {
+ "name" : "notifyAll",
+ "parameterTypes" : [ ]
+ }, {
+ "name" : "setCustomId",
+ "parameterTypes" : [ "java.lang.String" ]
+ }, {
+ "name" : "toString",
+ "parameterTypes" : [ ]
+ }, {
+ "name" : "unwrap",
+ "parameterTypes" : [ ]
+ }, {
+ "name" : "wait",
+ "parameterTypes" : [ ]
+ }, {
+ "name" : "wait",
+ "parameterTypes" : [ "long" ]
+ }, {
+ "name" : "wait",
+ "parameterTypes" : [ "long", "int" ]
+ } ]
+}, {
+ "name" : "java.lang.Class",
+ "fields" : [ ],
+ "methods" : [ {
+ "name" : "getCanonicalName",
+ "parameterTypes" : [ ]
+ }, {
+ "name" : "getName",
+ "parameterTypes" : [ ]
+ }, {
+ "name" : "getSimpleName",
+ "parameterTypes" : [ ]
+ } ]
+} ]
\ No newline at end of file
diff --git a/fj-doc-native-quarkus/pom.xml b/fj-doc-native-quarkus/pom.xml
index 1f72e3f86..90c59931e 100644
--- a/fj-doc-native-quarkus/pom.xml
+++ b/fj-doc-native-quarkus/pom.xml
@@ -78,6 +78,10 @@
org.fugerit.java
fj-doc-freemarker
+
+ org.fugerit.java
+ fj-doc-mod-opencsv
+
org.junit.jupiter
junit-jupiter
diff --git a/fj-doc-native-quarkus/src/main/java/org/fugerit/java/fjdocnativequarkus/DocResource.java b/fj-doc-native-quarkus/src/main/java/org/fugerit/java/fjdocnativequarkus/DocResource.java
index b0785a34c..f42a77e2f 100644
--- a/fj-doc-native-quarkus/src/main/java/org/fugerit/java/fjdocnativequarkus/DocResource.java
+++ b/fj-doc-native-quarkus/src/main/java/org/fugerit/java/fjdocnativequarkus/DocResource.java
@@ -82,8 +82,17 @@ public byte[] asciidocExample() {
return processDocument(DocConfig.TYPE_ADOC);
}
-
-
-
+ @APIResponse(responseCode = "200", description = "The CSV document content" )
+ @APIResponse(responseCode = "500", description = "In case of an unexpected error" )
+ @Tag( name = "document" )
+ @Tag( name = "csv" )
+ @Operation( operationId = "AsciiDocExample", summary = "Example CSV generation",
+ description = "Generates an example CSV document using Fugerit Venus Doc handler" )
+ @GET
+ @Produces("text/csv")
+ @Path("/example.csv")
+ public byte[] csvExample() {
+ return processDocument(DocConfig.TYPE_CSV);
+ }
}
diff --git a/fj-doc-native-quarkus/src/main/resources/fj-doc-native-quarkus/fm-doc-process-config.xml b/fj-doc-native-quarkus/src/main/resources/fj-doc-native-quarkus/fm-doc-process-config.xml
index a284b7c20..c3b306236 100644
--- a/fj-doc-native-quarkus/src/main/resources/fj-doc-native-quarkus/fm-doc-process-config.xml
+++ b/fj-doc-native-quarkus/src/main/resources/fj-doc-native-quarkus/fm-doc-process-config.xml
@@ -24,6 +24,8 @@
+
+
diff --git a/fj-doc-native-quarkus/src/test/java/test/org/fugerit/java/fjdocnativequarkus/DocResourceTest.java b/fj-doc-native-quarkus/src/test/java/test/org/fugerit/java/fjdocnativequarkus/DocResourceTest.java
index 79f1cf639..c9fcd7fc5 100644
--- a/fj-doc-native-quarkus/src/test/java/test/org/fugerit/java/fjdocnativequarkus/DocResourceTest.java
+++ b/fj-doc-native-quarkus/src/test/java/test/org/fugerit/java/fjdocnativequarkus/DocResourceTest.java
@@ -26,6 +26,11 @@ void testAsciiDoc() {
given().when().get("/doc/example.adoc").then().statusCode(200);
}
+ @Test
+ void testCsv() {
+ given().when().get("/doc/example.csv").then().statusCode(200);
+ }
+
@Test
void testException() {
DocResource resoure = new DocResource();