Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to validate API-Request using a path parameter #1

Closed
cwiechmann opened this issue Dec 21, 2021 · 0 comments
Closed

Failed to validate API-Request using a path parameter #1

cwiechmann opened this issue Dec 21, 2021 · 0 comments
Milestone

Comments

@cwiechmann
Copy link

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.

@cwiechmann cwiechmann added this to the 1.1.0 milestone Dec 21, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant