Hello,
I'm encountering a challenge in IBM API Connect where I need to bypass JSON validation for requests with empty bodies. My approach involves using a switch condition $string(message.body) != "" to detect non-empty bodies for validation. However, this condition fails to work as intended unless I insert a non-operational GatewayScript policy anywhere in the assembly.
Here's what I've tried:
- Placing a no-op GatewayScript
- Using the switch condition to attempt bypassing validation for empty bodies.
Oddly, the switch only works with the GatewayScript in place. Does anyone know why this happens, or how to implement this bypass more directly without such workarounds?
Appreciate any insights or suggestions!
Thank you.
------------------------------
Soulaiman El Maimouni
------------------------------