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-kamelets-examples.git
The following commit(s) were added to refs/heads/main by this push:
new daed9be CAMEL-20825: Add api-doc to example
daed9be is described below
commit daed9be26ff0a95a8d4cb1b4aaaa631d89dbd834
Author: Claus Ibsen <[email protected]>
AuthorDate: Sat Jun 1 13:19:21 2024 +0200
CAMEL-20825: Add api-doc to example
---
jbang/open-api-contract-first/README.md | 7 +++++++
jbang/open-api-contract-first/petstore.camel.yaml | 1 +
2 files changed, 8 insertions(+)
diff --git a/jbang/open-api-contract-first/README.md
b/jbang/open-api-contract-first/README.md
index c4c1f9f..40cfdab 100644
--- a/jbang/open-api-contract-first/README.md
+++ b/jbang/open-api-contract-first/README.md
@@ -57,4 +57,11 @@ The petstore has 18 apis, and this example has none
implemented.
The returned response is loaded from disk in the `camel-mock` folder, as you
can see it has pet/123.json as a file,
that will be returned when you call `/api/v3/pet/123`.
+## API Contract
+
+The API contract is made public (see source), which can be accessed via:
+
+```
+$ curl -i http://localhost:8080/api-doc
+```
diff --git a/jbang/open-api-contract-first/petstore.camel.yaml
b/jbang/open-api-contract-first/petstore.camel.yaml
index 92c57f6..63241d0 100644
--- a/jbang/open-api-contract-first/petstore.camel.yaml
+++ b/jbang/open-api-contract-first/petstore.camel.yaml
@@ -1,5 +1,6 @@
- restConfiguration:
clientRequestValidation: true
+ apiContextPath: api-doc
- rest:
openApi:
specification: petstore-v3.json