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
commit 673cf8c2a75c61abc739080a4bf75b06943fae2d Author: Claus Ibsen <[email protected]> AuthorDate: Thu May 8 10:34:10 2025 +0200 Polished for Camel 4.12 --- jbang/open-api-contract-first/README.md | 8 ++++---- jbang/open-api-contract-first/petstore.camel.yaml | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/jbang/open-api-contract-first/README.md b/jbang/open-api-contract-first/README.md index 621f024..bf59b5e 100644 --- a/jbang/open-api-contract-first/README.md +++ b/jbang/open-api-contract-first/README.md @@ -22,7 +22,7 @@ camel run * Then you can test by calling to get pet with id 123: ``` -$ curl -i http://localhost:8080/api/v3/pet/123 +$ curl -i http://localhost:8080/myapi/pet/123 HTTP/1.1 200 OK Accept: */* User-Agent: curl/8.1.2 @@ -37,7 +37,7 @@ Content-Type: application/json If you get a pet with any other ID than 123, such as 444, you will get the response from the example that are inlined in the OpenAPI specification file `petstore-v3.json`. ``` -$ curl -i http://localhost:8080/api/v3/pet/444 +$ curl -i http://localhost:8080/myapi/pet/444 HTTP/1.1 200 OK Accept: */* User-Agent: curl/8.1.2 @@ -55,13 +55,13 @@ The example will return an empty response if you request non implemented API end 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`. +that will be returned when you call `/myapi/pet/123`. ## API Contract The API contract is made public (see source), which can be accessed via: ``` -$ curl -i http://localhost:8080/api-doc +$ curl -i http://localhost:8080/myapi/api-doc ``` diff --git a/jbang/open-api-contract-first/petstore.camel.yaml b/jbang/open-api-contract-first/petstore.camel.yaml index 63241d0..d7b81b7 100644 --- a/jbang/open-api-contract-first/petstore.camel.yaml +++ b/jbang/open-api-contract-first/petstore.camel.yaml @@ -1,6 +1,7 @@ - restConfiguration: clientRequestValidation: true apiContextPath: api-doc + contextPath: /myapi - rest: openApi: specification: petstore-v3.json
