【发布时间】:2018-03-15 20:02:42
【问题描述】:
在 Mulesoft 中使用“Validate JSON Schema”元素时,如果出现多个验证错误,则将以下消息放入#[exception]。
org.mule.api.MessagingException: Json content is not compliant with schema
com.github.fge.jsonschema.core.report.ListProcessingReport: failure
--- BEGIN MESSAGES ---
error: string "blah" is too long (length: 4, maximum allowed: 3)
level: "error"
schema: {"loadingURI":"file:/...}
instance: {"pointer":"/blah_blah_code"}
domain: "validation"
keyword: "maxLength"
value: "blah"
found: 4
maxLength: 3
error: string "USDe" is too long (length: 4, maximum allowed: 3)
level: "error"
schema: {"loadingURI":"file:/..."}
instance: {"pointer":"/blah_code"}
domain: "validation"
keyword: "maxLength"
value: "USDe"
found: 4
maxLength: 3
--- END MESSAGES ---
有没有办法提取个别错误?
【问题讨论】:
标签: json mule mule-component json-schema-validator