Does the validate mediator validate a message payload against a JSON schema?
If validate mediator does not validate JSON against a schema, what is the best workaround?
Currently there is no native JSON schema validation support in any ESB mediators. As a workaround, you will have to create an XSD structure as per your JSON payload and then use it in the validate mediator [1].
But however this feature is available in the road map [2].
[1] - https://docs.wso2.com/display/ESB490/Validate+Mediator
You can simply do this using filter mediators. use filter mediators for validate required keys/values in request.
for more details about filter mediators refer the below [1] wso2 doc
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.