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
I'm using the newJsonBody builder for the LambdaDsl tests in Java - Junit5
The JsonBody I am trying to mock has a field that has a hyperlink as it's fieldName, but as soon as I add a fieldName into the builder that contains a . or a / character, it turns the fieldName into a JsonList of that string, instead of just leaving it as a plain old String.
This is the goal of my mocked response:
This is the code I am currently using:
withContent(
newJsonBody(
(body) -> {
final PactDslJsonBody actualPactDsl =
new PactDslJsonBody();
var jwtHelper =
new JwtTestHelper(
VALID_VC_HEADER,
VALID_VC_BODY,
VALID_VC_SIGNATURE);
body.nullValue("error");
body.stringValue("iss", "f2f");
body.stringValue("sub", "test-subject");
body.stringType(
"state",
"f5f0d4d1-b937-4abe-b379-8269f600ad44");
body.minArrayLike(
"https://vocab.account.gov.uk/v1/credentialJWT",
1,
PactDslJsonRootValue.stringMatcher(
jwtHelper
.buildRegexMatcherIgnoringSignature(),
jwtHelper.buildJwt()),
1);
actualPactDsl.close();
body.nullValue("error_description");
})
.build())
This code produces the following JSON:
The text was updated successfully, but these errors were encountered:
I'm using the
newJsonBody
builder for theLambdaDsl
tests in Java -Junit5
The JsonBody I am trying to mock has a field that has a hyperlink as it's fieldName, but as soon as I add a fieldName into the builder that contains a
.
or a/
character, it turns the fieldName into a JsonList of that string, instead of just leaving it as a plain old String.This is the goal of my mocked response:
This is the code I am currently using:
This code produces the following JSON:
The text was updated successfully, but these errors were encountered: