Imagine the scenario where the consumer production code under test is adding an API key as query parameter when calling the provider because it's required by some intermediate layers between the consumer and provider (typically an API Gateway).
There are some cases where this API key as query parameter doesn't make much sense to be part of the Pact contract.
However, if not added to the contract, the mock server created from the contract in consumer tests will not match queries that are actually adding the query parameter. Thus making it impossible to write a unit test using the mock server on the consumer side.
Is there a way to have a query parameter actually present in the requests be ignored from the consumer mock server when matching query parameters to find the appropriate response?
(Asking in a JVM (Java and/or Scala) context if that matters).