How to match a wiremock POST request with some optional JSON parameters & any values?
Being new to Stack community, I have raised the below query(afraid that it would be marked as duplicate) in the post (link mentioned above) but it has been deleted stating its the different question and need to raise new question.
Below is my query on top of it:
If the optional parameter is not present in the request than the solution provided in the above post suffice the purpose.
But If the optional parameter is present and we need to check that it contains specific values only (say not null) then how to do that using request matching in wiremock.
Kindly provide your inputs as I am new to wiremock
For instance:
{
"optional1"="ValueAlwaysYESIfPresent",
"optional2"="ValueAlwaysNOIfPresent"
}
Thanks in advance.