Hi Stefen,
This issue has been brought up numerous times over the years via PMRs as the messages generated in some cases are not very helpful in determining the specific property that has violated some restriction in the .jsv, but unfortunately a change to the schema validation messages is much more complicated that one would think and would require a request for enhancement to the DataPower product. There is nothing you can do either with the validation action or the .jsv file to improve the messages being generated. I reviewed the Aha site and this requirement was there but was closed and is not under consideration. You can always try to open a new RFE, but just my view I don't see this getting much priority given current development priorities.
Best Regards,
Steve
------------------------------
Steve Linn
Senior Consulting I/T Specialist
IBM
------------------------------
Original Message:
Sent: Mon February 12, 2024 12:39 AM
From: Stefen Salvatore
Subject: Customization of JSON Schema Validation Error - Validate Policy Definition
Hello All,
While validating json request body using validate policy in IBM APIConnect we usually get one default error message in response if validation fails.
i.e.,
"additionalinfo":"Validate: temporary:///swagger/inquiry-api_1.0.0.json:458: [JSV0001] Invalid value type 'string'.",
or
"additionalinfo":"Validate: temporary:///swagger/inquiry-api_1.0.0.json:458: [JSV0001] field does not match pattern ^[A-Z]+$"
but it does not show the field's exact name which is mismatched as per the JSON schema definition.
My query is, do we have anything to do for the customization of this error which shows this particular field is not matched with the pattern or type?
Any input from you folks will be helpful.
@Steve Linn, it would be helpful if you give me your input.
------------------------------
Stefen Salvatore
------------------------------