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 f0ecf0c CAMEL-22121: rest-dsl: Add client response validator
f0ecf0c is described below
commit f0ecf0c0268e8eccaf38bd45a2f0645d6170b7f2
Author: Claus Ibsen <[email protected]>
AuthorDate: Wed Jun 18 10:14:33 2025 +0200
CAMEL-22121: rest-dsl: Add client response validator
---
jbang/open-api-contract-first/application.properties | 13 ++++++++++++-
jbang/open-api-contract-first/petstore.camel.yaml | 1 +
2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/jbang/open-api-contract-first/application.properties
b/jbang/open-api-contract-first/application.properties
index c426c79..88cccc1 100644
--- a/jbang/open-api-contract-first/application.properties
+++ b/jbang/open-api-contract-first/application.properties
@@ -1,2 +1,13 @@
+# embed HTTP serer
+camel.server.enabled=true
+
+# mock responses
camel.component.rest-openapi.mockIncludePattern =
file:camel-mock/**,classpath:camel-mock/**
-camel.server.enabled=true
\ No newline at end of file
+
+# include the more powerful validator
+camel.jbang.dependencies = camel-openapi-validator
+
+# you can tweak validation levels
+#
https://bitbucket.org/atlassian/swagger-request-validator/src/c6200d0d849ae69be679f7fe01042cd9e84637c4/swagger-request-validator-core/README.md
+camel.rest.validation-levels[validation.request.security.missing] = IGNORE
+camel.rest.validation-levels[validation.request.security.invalid] = IGNORE
diff --git a/jbang/open-api-contract-first/petstore.camel.yaml
b/jbang/open-api-contract-first/petstore.camel.yaml
index d7b81b7..d343f27 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
+ clientResponseValidation: true
apiContextPath: api-doc
contextPath: /myapi
- rest: