I have an API on Anypoint Platform, it's important specs are:
- http scheme
- request endpoint = "retrieveInformation"
- queryParams = {"key": "value", isAllow: true}
I built the Mule flows using the RAML v1.0 having the above specs, and all functionality works fine. Now, I am trying to develop the mUnit for the mule flows. For a test case I set the below event and call flowReference to Mule flow.
#[{
headers: {
'client_space': 'ABCD-1234',
'client_code': 'XYZ-0001'
},
'queryParams': {
'key': '12345678',
'isAllow': true
},
'requestPath': '/api/retrieveInformation',
'rawRequestPath': '/api/retrieveInformation',
'requestUri': '',
'listenerPath': '/api/*',
'relativePath': '/retrieveInformation',
'method': 'GET',
'scheme': 'HTTP',
'version': 'HTTP/1.1',
'localAddress': '/127.0.0.1:8091',
'remoteAddress': ''
} as Object {
class: 'org.mule.extension.http.api.HttpRequestAttributes'
}]
Now running the units, APIKit:Router throws error i.e., cannot cast case from Boolean to String. If I change to " 'isAllow': 'true' ", then APIKit:Router throws valid error APIKIT:NOT_IMPLEMENTED.
Can anyone help how to achieve this scenario without changing API Specs?