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

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


The following commit(s) were added to refs/heads/main by this push:
     new 2efc65a  Say what three examples need before they run (#101)
2efc65a is described below

commit 2efc65a12da04a85a971f178c7240b399a2d05a9
Author: Claus Ibsen <[email protected]>
AuthorDate: Thu Oct 8 07:25:26 2026 +0200

    Say what three examples need before they run (#101)
    
    - ai/langchain4j-chat: a local model, `ollama pull granite4:3b`.
    - ai/openai-pii-redaction: an OpenAI-compatible API, set `OPENAI_API_KEY`.
    - contracts/openapi-client: `contracts/openapi-server` running first.
    
    The Needs column of the README tables says it now, and the catalog carries
    it for the tools to show before a run. Part of #99.
    
    
    Claude-Session: https://claude.ai/code/session_01STT6whBgK1AqsSsUKrnE8m
    
    Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
---
 README.md                              | 6 +++---
 ai/README.md                           | 4 ++--
 ai/langchain4j-chat/metadata.json      | 2 +-
 ai/openai-pii-redaction/metadata.json  | 2 +-
 camel-jbang-example-catalog.json       | 5 +++--
 contracts/README.md                    | 2 +-
 contracts/openapi-client/metadata.json | 3 ++-
 7 files changed, 13 insertions(+), 11 deletions(-)

diff --git a/README.md b/README.md
index e417eef..8d14c84 100644
--- a/README.md
+++ b/README.md
@@ -113,7 +113,7 @@ An OpenAPI contract served and called, and an API protected 
by Keycloak.
 | Example | What you will see | Needs |
 |---|---|---|
 | [OpenAPI server](contracts/openapi-server/) | The stock API contract first: 
stock-api.json is the OpenAPI contract, the REST DSL serves its three 
operations on port 8080 with request validation, GET /stock/{sku} answers from 
a file or 404, POST /stock/{sku}/reserve answers 200, 409 when the stock is 
short or 400 for a bad reservation, and /openapi serves the contract. | nothing 
|
-| [OpenAPI client](contracts/openapi-client/) | The picking desk reserves 
stock for every order line by calling the stock API by contract: rest-openapi 
turns the operationId reserveStock into the HTTP call from stock-api.json; the 
log shows each reservation and one 409 for the cap that is out of stock. Needs 
the openapi-server example running. | nothing |
+| [OpenAPI client](contracts/openapi-client/) | The picking desk reserves 
stock for every order line by calling the stock API by contract: rest-openapi 
turns the operationId reserveStock into the HTTP call from stock-api.json; the 
log shows each reservation and one 409 for the cap that is out of stock. Needs 
the openapi-server example running. | `contracts/openapi-server` running first |
 | [Keycloak security](contracts/keycloak-security-rest/) | Two HTTP endpoints 
on port 8081: the public one answers everyone, the protected one requires a 
bearer token from a Keycloak started with camel infra whose user has the admin 
role, otherwise 403; the realm, client and users are created in the Keycloak 
console as the README describes. | `camel infra run keycloak` |
 
 ### [AI](ai/)
@@ -122,9 +122,9 @@ A local model writing text, routes exposed as MCP tools, 
RAG over documents, PII
 
 | Example | What you will see | Needs |
 |---|---|---|
-| [LangChain4j chat](ai/langchain4j-chat/) | A local Ollama model started with 
camel infra writes the shipping notification for each of the three orders; the 
chat model is a bean built from properties, the prompt comes from the order, 
and the log shows the reply with its token counts. | `camel infra run ollama`, 
a local model |
+| [LangChain4j chat](ai/langchain4j-chat/) | A local Ollama model started with 
camel infra writes the shipping notification for each of the three orders; the 
chat model is a bean built from properties, the prompt comes from the order, 
and the log shows the reply with its token counts. | `camel infra run ollama`, 
a local model: `ollama pull granite4:3b` |
 | [MCP server](ai/mcp-server/) | Two routes are exposed as MCP tools, 
stock_level by SKU and order_status by order id, on http://localhost:8080/mcp 
with nothing but properties to switch the server on; any MCP client, a coding 
agent included, can list and call them, and the log shows each call. | nothing |
-| [OpenAI PII Redaction](ai/openai-pii-redaction/) | Text typed on standard 
input is sent to an OpenAI-compatible model with a JSON schema that asks for 
the personal identifiers redacted, and the redacted text is printed on standard 
output. | an OpenAI-compatible API |
+| [OpenAI PII Redaction](ai/openai-pii-redaction/) | Text typed on standard 
input is sent to an OpenAI-compatible model with a JSON schema that asks for 
the personal identifiers redacted, and the redacted text is printed on standard 
output. | an OpenAI-compatible API: set `OPENAI_API_KEY` |
 | [Document Analysis with Docling and LangChain4j 
RAG](ai/docling-langchain4j-rag/) | Documents dropped in a directory are 
converted to Markdown by a Docling service, analysed by a local Ollama model 
through langchain4j-chat, and written as a report to an output directory; an 
HTTP endpoint answers questions against the latest document. | `camel infra run 
docling ollama`, a local model |
 
 ### [Cloud](cloud/)
diff --git a/ai/README.md b/ai/README.md
index 57614fb..04d6ac5 100644
--- a/ai/README.md
+++ b/ai/README.md
@@ -5,9 +5,9 @@ A local model writing text, routes exposed as MCP tools, RAG 
over documents, PII
 
 | Example | What you will see | Needs |
 |---|---|---|
-| [LangChain4j chat](langchain4j-chat/) | A local Ollama model started with 
camel infra writes the shipping notification for each of the three orders; the 
chat model is a bean built from properties, the prompt comes from the order, 
and the log shows the reply with its token counts. | `camel infra run ollama`, 
a local model |
+| [LangChain4j chat](langchain4j-chat/) | A local Ollama model started with 
camel infra writes the shipping notification for each of the three orders; the 
chat model is a bean built from properties, the prompt comes from the order, 
and the log shows the reply with its token counts. | `camel infra run ollama`, 
a local model: `ollama pull granite4:3b` |
 | [MCP server](mcp-server/) | Two routes are exposed as MCP tools, stock_level 
by SKU and order_status by order id, on http://localhost:8080/mcp with nothing 
but properties to switch the server on; any MCP client, a coding agent 
included, can list and call them, and the log shows each call. | nothing |
-| [OpenAI PII Redaction](openai-pii-redaction/) | Text typed on standard input 
is sent to an OpenAI-compatible model with a JSON schema that asks for the 
personal identifiers redacted, and the redacted text is printed on standard 
output. | an OpenAI-compatible API |
+| [OpenAI PII Redaction](openai-pii-redaction/) | Text typed on standard input 
is sent to an OpenAI-compatible model with a JSON schema that asks for the 
personal identifiers redacted, and the redacted text is printed on standard 
output. | an OpenAI-compatible API: set `OPENAI_API_KEY` |
 | [Document Analysis with Docling and LangChain4j 
RAG](docling-langchain4j-rag/) | Documents dropped in a directory are converted 
to Markdown by a Docling service, analysed by a local Ollama model through 
langchain4j-chat, and written as a report to an output directory; an HTTP 
endpoint answers questions against the latest document. | `camel infra run 
docling ollama`, a local model |
 
 Start with [LangChain4j chat](langchain4j-chat/); the examples read best in 
the order above, each one building on what the one before it set up.
diff --git a/ai/langchain4j-chat/metadata.json 
b/ai/langchain4j-chat/metadata.json
index 4238555..0a5139a 100644
--- a/ai/langchain4j-chat/metadata.json
+++ b/ai/langchain4j-chat/metadata.json
@@ -34,5 +34,5 @@
     "requiresDocker": true,
     "bundled": false,
     "ciSkip": true,
-    "needs": "a local model"
+    "needs": "a local model: `ollama pull granite4:3b`"
 }
diff --git a/ai/openai-pii-redaction/metadata.json 
b/ai/openai-pii-redaction/metadata.json
index 717670d..7553b07 100644
--- a/ai/openai-pii-redaction/metadata.json
+++ b/ai/openai-pii-redaction/metadata.json
@@ -17,6 +17,6 @@
         "security"
     ],
     "bundled": false,
-    "needs": "an OpenAI-compatible API",
+    "needs": "an OpenAI-compatible API: set `OPENAI_API_KEY`",
     "ciSkip": true
 }
diff --git a/camel-jbang-example-catalog.json b/camel-jbang-example-catalog.json
index 2175a3b..ee1623b 100644
--- a/camel-jbang-example-catalog.json
+++ b/camel-jbang-example-catalog.json
@@ -90,7 +90,7 @@
         "infraServices": [
             "ollama"
         ],
-        "needs": "a local model",
+        "needs": "a local model: `ollama pull granite4:3b`",
         "ciSkip": true,
         "order": 1
     },
@@ -167,7 +167,7 @@
             "pii-redaction.camel.yaml",
             "pii.schema.json"
         ],
-        "needs": "an OpenAI-compatible API",
+        "needs": "an OpenAI-compatible API: set `OPENAI_API_KEY`",
         "ciSkip": true,
         "order": 3
     },
@@ -704,6 +704,7 @@
             "orders/order-1003.json",
             "stock-api.json"
         ],
+        "needs": "`contracts/openapi-server` running first",
         "order": 2
     },
     {
diff --git a/contracts/README.md b/contracts/README.md
index 4758ad6..e1b5d8b 100644
--- a/contracts/README.md
+++ b/contracts/README.md
@@ -6,7 +6,7 @@ An OpenAPI contract served and called, and an API protected by 
Keycloak.
 | Example | What you will see | Needs |
 |---|---|---|
 | [OpenAPI server](openapi-server/) | The stock API contract first: 
stock-api.json is the OpenAPI contract, the REST DSL serves its three 
operations on port 8080 with request validation, GET /stock/{sku} answers from 
a file or 404, POST /stock/{sku}/reserve answers 200, 409 when the stock is 
short or 400 for a bad reservation, and /openapi serves the contract. | nothing 
|
-| [OpenAPI client](openapi-client/) | The picking desk reserves stock for 
every order line by calling the stock API by contract: rest-openapi turns the 
operationId reserveStock into the HTTP call from stock-api.json; the log shows 
each reservation and one 409 for the cap that is out of stock. Needs the 
openapi-server example running. | nothing |
+| [OpenAPI client](openapi-client/) | The picking desk reserves stock for 
every order line by calling the stock API by contract: rest-openapi turns the 
operationId reserveStock into the HTTP call from stock-api.json; the log shows 
each reservation and one 409 for the cap that is out of stock. Needs the 
openapi-server example running. | `contracts/openapi-server` running first |
 | [Keycloak security](keycloak-security-rest/) | Two HTTP endpoints on port 
8081: the public one answers everyone, the protected one requires a bearer 
token from a Keycloak started with camel infra whose user has the admin role, 
otherwise 403; the realm, client and users are created in the Keycloak console 
as the README describes. | `camel infra run keycloak` |
 
 Start with [OpenAPI server](openapi-server/); the examples read best in the 
order above, each one building on what the one before it set up.
diff --git a/contracts/openapi-client/metadata.json 
b/contracts/openapi-client/metadata.json
index 8befdd6..6db839f 100644
--- a/contracts/openapi-client/metadata.json
+++ b/contracts/openapi-client/metadata.json
@@ -31,5 +31,6 @@
         "client",
         "contract"
     ],
-    "bundled": true
+    "bundled": true,
+    "needs": "`contracts/openapi-server` running first"
 }

Reply via email to