Validates request and response message bodies against a schema. The schema type is selected by the attribute you set: wsdl for SOAP messages, schema for XML against an XSD, jsonSchema for JSON or YAML, or schematron. Exactly one of them must be configured; inside a soapProxy the WSDL is taken from the proxy automatically. An empty body passes; an invalid body is rejected with an error response that lists what was wrong. Set validationDetails to false to reject with a bare error instead, and failureHandler to control where the failure is logged. See distribution/tutorials/xml/50-XSD-Schema-validation.yaml and distribution/tutorials/soap/40-WSDL-Message-Validation.yaml.
Where a validation failure is reported in addition to the error response. log writes the details to the log, response does not. What the client receives is controlled by validationDetails.
log
jsonSchema
false
-
JSON Schema (URL or file) to validate JSON or YAML message bodies against.
schema2000.json
schema
false
-
XSD schema (URL or file) to validate XML message bodies against.
http://www.predic8.com/schemas/order.xsd
schematron
false
-
Schematron schema (URL or file) to validate XML message bodies against.
car-schematron.xml
schemaVersion
false
2020-12
JSON Schema draft to validate against. Applies only to jsonSchema.
04, 05, 06, 07, 2019-09, 2020-12
serviceName
false
-
Name of a service element in the WSDL. When set, messages are validated against that service only.
ArticleService
skipFaults
false
false
Whether to skip validation of SOAP fault messages. Only valid together with wsdl.
-
validationDetails
false
true
Whether validation error responses list what was wrong with the message. Set to false to reject with a bare error instead. The details are not hidden by production mode, because the schema a message is validated against is public.
false
wsdl
false
-
WSDL (URL or file) to validate SOAP request and response messages against.