Openapi Validator

Since Camel 4.7

Camel comes with a default client request/response validator for the Camel Rest DSL.

The camel-openapi-validator uses the third party Atlassian Swagger Request Validator library instead for client request/response validator. This library is a more extensive validator than the default validator from camel-core.

Auto-detection from classpath

To use this implementation all you need to do is to add the camel-openapi-validator dependency to the classpath.

Configuring levels of errors

The Atlassian Swagger Request Validator supports configuring fine-grained levels for validating. This allows to turn on ignoring some specific errors.

For example, you can ignore query parameters

camel.rest.validation-levels[validation.schema.required] = INFO
camel.rest.validation-levels[validation.request.parameter.query.missing] = IGNORE
camel.rest.validation-levels[validation.response.body.missing] = WARN