You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the Provider test, I am setting a number value in the request body. However when the test runs its converts it from an Integer to String.
In my consumer everything works and contract generated correctly:
I have the following line in my request body accountId: fromProviderState('${accountId}', accountId)
In the debug logs I can see it populating correctly with correct type
Calling match_values for path $.accountId
Comparing '1686819389' to '1686819389' using Type -> Ok(())
Comparing 'Number([1686819389](tel:1686819389))' to 'Number([1686819389](tel:1686819389))' at path '$.accountId' -> Ok(())
body: '{…….. ,"accountId":1686819389}'
In my provider:
int accountId = 2;
providerStateParameters.put(ACCOUNT_ID, accountId);
In the debug logs:
****I set my account id as: 1689080143238***
body: PRESENT({………..,"accountId":"1689080143238"})
Both consumer (pact-js) and provider (pact-jvm) are on the latest version
The text was updated successfully, but these errors were encountered:
mefellows
added
triage
This issue is yet to be triaged by a maintainer
upstream
Indicates that an issue relates to an upstream problem (such as in pact-reference)
labels
Aug 23, 2023
my consumer tests are written in Pact-JS
it logs the value as the correct type pact_matching::json: compare_values: Calling match_values for path $.userId pact_matching::json: JSON -> JSON: Comparing '1' to '1' using Type -> Ok(()) pact_matching::json: compare_values: Comparing 'Number(1)' to 'Number(1)' at path '$.userId' -> Ok(())
In the Provider test, I am setting a number value in the request body. However when the test runs its converts it from an Integer to String.
In my consumer everything works and contract generated correctly:
I have the following line in my request body
accountId: fromProviderState('${accountId}', accountId)
In the debug logs I can see it populating correctly with correct type
In my provider:
In the debug logs:
Both consumer (pact-js) and provider (pact-jvm) are on the latest version
The text was updated successfully, but these errors were encountered: