You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by pc...@apache.org on 2023/05/08 11:07:01 UTC

[camel-k] branch main updated: chore(doc): Java api support

This is an automated email from the ASF dual-hosted git repository.

pcongiusti pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-k.git


The following commit(s) were added to refs/heads/main by this push:
     new 55df9cf26 chore(doc): Java api support
55df9cf26 is described below

commit 55df9cf26a6259b70c2e9b7943d33cb84ec809c8
Author: Pasquale Congiusti <pa...@gmail.com>
AuthorDate: Mon May 8 12:53:25 2023 +0200

    chore(doc): Java api support
    
    Closes #4262
---
 docs/modules/ROOT/nav-end.adoc         |  1 +
 docs/modules/ROOT/pages/apis/java.adoc | 23 +++++++++++++++++++++++
 2 files changed, 24 insertions(+)

diff --git a/docs/modules/ROOT/nav-end.adoc b/docs/modules/ROOT/nav-end.adoc
index 311dee8d1..c42d670db 100644
--- a/docs/modules/ROOT/nav-end.adoc
+++ b/docs/modules/ROOT/nav-end.adoc
@@ -17,6 +17,7 @@
 * API
 ** xref:apis/camel-k.adoc[Camel K API]
 ** xref:apis/kamelets.adoc[Kamelets API]
+** xref:apis/java.adoc[Java API]
 * xref:contributing/developers.adoc[Contributing]
 ** xref:contributing/local-development.adoc[Local development]
 ** xref:contributing/local-deployment-olm.adoc[Local OLM deployment]
diff --git a/docs/modules/ROOT/pages/apis/java.adoc b/docs/modules/ROOT/pages/apis/java.adoc
new file mode 100644
index 000000000..bdce22575
--- /dev/null
+++ b/docs/modules/ROOT/pages/apis/java.adoc
@@ -0,0 +1,23 @@
+= Java API
+
+If you want to integrate the Kubernetes API in your software, we support a https://github.com/fabric8io/kubernetes-client[kubernetes-client] typed API to access Camel K/Kamelets resources from Java programming language. This autogenerated project is released with any release of Camel K, so, the version you're willing to use is aligned with the one of the operator released.
+
+Importing the dependency in Maven projects looks like:
+
+[source,xml]
+----
+<dependency>
+  <groupId>org.apache.camel.k</groupId>
+  <artifactId>camel-k-crds</artifactId>
+  <version>${version}</version>
+</dependency>
+----
+
+At this stage you can easily use them such in the following example:
+
+[source,java]
+----
+var client = new KubernetesClientBuilder().build();
+var camelCatalogClient = client.resources(CamelCatalog.class);
+camelCatalogClient.list() ...
+----