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/12/15 11:01:31 UTC

(camel-k-examples) branch fix/openapi_configmap updated (524d688 -> 3a71b70)

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

pcongiusti pushed a change to branch fix/openapi_configmap
in repository https://gitbox.apache.org/repos/asf/camel-k-examples.git


 discard 524d688  fix: configmap is the only supported way
     new 3a71b70  fix: configmap is the only supported way

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (524d688)
            \
             N -- N -- N   refs/heads/fix/openapi_configmap (3a71b70)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 generic-examples/openapi/greetings-api.json | 2 +-
 generic-examples/openapi/greetings.groovy   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)


(camel-k-examples) 01/01: fix: configmap is the only supported way

Posted by pc...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 3a71b70b76ab73c8d3f5824a676ca76e6a0d357c
Author: Pasquale Congiusti <pa...@gmail.com>
AuthorDate: Fri Dec 15 12:00:10 2023 +0100

    fix: configmap is the only supported way
---
 generic-examples/openapi/README.md        | 3 ++-
 generic-examples/openapi/greetings.groovy | 7 ++++---
 generic-examples/openapi/petstore.groovy  | 6 ++++--
 3 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/generic-examples/openapi/README.md b/generic-examples/openapi/README.md
index 1b846a2..7e26b0c 100644
--- a/generic-examples/openapi/README.md
+++ b/generic-examples/openapi/README.md
@@ -7,7 +7,8 @@ Find useful examples about how to expose an Open API specification in a Camel K
 Deploy the examples running
 
 ```
-kamel run --dev --name greetings --open-api file:greetings-api.json greetings.groovy
+kubectl create configmap my-openapi --from-file=greetings-api.json
+kamel run --dev --name greetings --open-api configmap:my-openapi greetings.groovy
 ```
 
 Then you can test by calling the hello endpoint, ie:
diff --git a/generic-examples/openapi/greetings.groovy b/generic-examples/openapi/greetings.groovy
index 90a09ce..511fb83 100644
--- a/generic-examples/openapi/greetings.groovy
+++ b/generic-examples/openapi/greetings.groovy
@@ -17,10 +17,11 @@
  */
 
 //
-//  kamel run --dev --name greetings --open-api greetings-api.json greetings.groovy
-// 
+// kubectl create configmap my-openapi --from-file=greetings-api.json
+// kamel run --dev --name greetings --open-api configmap:my-openapi greetings.groovy
+//
 
 from('direct:greeting-api')
-    .to('log:api?showAll=true&multiline=true') 
+    .to('log:api?showAll=true&multiline=true')
     .setBody()
         .simple('Hello from ${headers.name}')
diff --git a/generic-examples/openapi/petstore.groovy b/generic-examples/openapi/petstore.groovy
index e5221e1..8f90173 100644
--- a/generic-examples/openapi/petstore.groovy
+++ b/generic-examples/openapi/petstore.groovy
@@ -16,9 +16,11 @@
  * limitations under the License.
  */
 
+
+//
+// kubectl create configmap my-petstore-api --from-file=petstore-api.yaml
+// kamel run --dev --name petstore --open-api configmap:my-petstore-api petstore.groovy
 //
-//  kamel run --dev --name petstore --open-api file:petstore-api.yaml petstore.groovy
-// 
 
 from('direct:listPets')
     .log('listPets')