0

I am going to model a map of collection as the response of my provider using pact dsl, But I can not figure out how. I appreciate if somebody can help me on this.

Map<String, Collection<myObject>> responseBody;
setiabb
  • 529
  • 1
  • 5
  • 13

1 Answers1

0

This is the way I could model it:

DslPart respBody = new PactDslJsonBody()
            .object("object name")
                .eachKeyMappedToAnArrayLike("key of the map")
                    //myObject body
                .closeArray()
            .closeObject();
setiabb
  • 529
  • 1
  • 5
  • 13