tree: 7b8dedaa3fbc27605df0b931933b80a45ad3ac34 [path history] [tgz]
  1. greetings-api.json
  2. greetings.groovy
  3. petstore-api.yaml
  4. petstore.groovy
  5. README.md
generic-examples/openapi/README.md

Open API Camel K examples

Find useful examples about how to expose an Open API specification in a Camel K integration.

Greetings example

Deploy the examples running

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:

$ curl -i http://192.168.49.2:31373/camel/greetings/hello
HTTP/1.1 200 OK
Accept: */*
name: hello
User-Agent: curl/7.68.0
transfer-encoding: chunked

Hello from hello