Closed mefellows closed 2 years ago
The docs for the provider state generator indicate the serialisation format should be:
{"expression": "/api/user/${id}", type": "ProviderStateGenerator"}
However, the rust core seems to produce a value that is simply ProviderState. See this example interaction produced from the latest (0.1.6) FFI from the Pact JS repository:
ProviderState
{ "description": "a request to get the account details", "providerStates": [ { "name": "Account Test001 exists", "params": { "accountRef": "Test001" } } ], "request": { "generators": { "query": { "$.accountNumber[0]": { "expression": "${accountNumber}", "type": "ProviderState" } } }, "headers": { "Accept": "application/hal+json" }, "matchingRules": { "header": {}, "query": { "$.accountNumber[0]": { "combine": "AND", "matchers": [ { "match": "type" } ] } } }, "method": "GET", "path": "/accounts/search/findOneByAccountNumberId", "query": { "accountNumber": [ "100" ] } },
I'm assuming the docs are incorrect?
The docs are wrong
I'll fix, thanks.
The docs for the provider state generator indicate the serialisation format should be:
However, the rust core seems to produce a value that is simply
ProviderState
. See this example interaction produced from the latest (0.1.6) FFI from the Pact JS repository:I'm assuming the docs are incorrect?