Matching algorithm issue

Hi,

Could you explain in details Postman Matching algorithm(specially n and m in description:).

-Try to match the input path with the example path exactly as it is. The max value is set as the matching threshold.
-Try to strip trailing slashes and match the input path with the example path. The threshold is reduced by a certain value, n.
-Try to additionally lowercase the input path and the example path The threshold is reduced by a greater value, n + m.
-Try to additionally strip out alphanumeric ids from the input path and the example path. The threshold is reduced further, n + 2m.
-If all steps fail, this saved example is not an eligible response.

Every time the mock request path matches an example, the example gets a score and the example with the highest score is returned.

An exact match has the highest score. Every time there is a match after performing some transformation, the score gets reduced by an amount n. Every subsequent transformation reduces the score by n (or you can call it m). So you go from n to 2n (if n=m) or n+m (if n is not equal to m).

1 Like