IBM Integration Community Come for answers. Stay for best practices. All we’re missing is you. Join / Log in Ask a question
I am using the attached swagger file for enumerating the day parameter present in query parameter of the GET request to check against some predefined values. Also I am using the validate policy as my first policy to validate the body-param. Below screen shot. Whatever param value I send in the query it takes in and doesn't throw an error.
I get back a proper response. basically Its not doing a strict check against the enum values. Please help.
Hi Radhika,The validate policy is for validating the body only, not parameters. The only parameter validation that is done today is the required property. For now my only suggestion would be to have a GatewayScript policy at the beginning of the assembly that would do a context.reject if the value doesn't match what you want. You could open a PMR to have this done based upon the parameter configuration, but my assumption would be this would be considered a request for enhancement although I would see this as a useful feature.Best Regards,Steve