When having an API using a path parameter like the following request from the Petstore:
GET http://api.customer.com/v2/store/order/123456
The validation fails with the following error message:
Instance type (string) does not match any allowed primitive type (allowed: ["integer"])
The is because the current Javascript-Code example is using the variable:
def path = msg.get("api.method.path");
which doesn't contain the resolved path (/v2/store/order/123456) and instead the specified API-Method (e.g. /store/order/{orderId}). And as {orderId} is clearly a string the validation fails.
When having an API using a path parameter like the following request from the Petstore:
The validation fails with the following error message:
The is because the current Javascript-Code example is using the variable:
which doesn't contain the resolved path (
/v2/store/order/123456
) and instead the specified API-Method (e.g./store/order/{orderId}
). And as{orderId}
is clearly a string the validation fails.