{"action":"created","issue":{"url":"https://api.github.com/repos/DiUS/pact-jvm/issues/297","repository_url":"https://api.github.com/repos/DiUS/pact-jvm","labels_url":"https://api.github.com/repos/DiUS/pact-jvm/issues/297/labels{/name}","comments_url":"https://api.github.com/repos/DiUS/pact-jvm/issues/297/comments","events_url":"https://api.github.com/repos/DiUS/pact-jvm/issues/297/events","html_url":"https://github.com/DiUS/pact-jvm/issues/297","id":168739082,"number":297,"title":"pact-jvm-provider-gradle - Validating number of data on array.","user":{"login":"pedrro","id":4137355,"avatar_url":"https://avatars.githubusercontent.com/u/4137355?v=3","gravatar_id":"","url":"https://api.github.com/users/pedrro","html_url":"https://github.com/pedrro","followers_url":"https://api.github.com/users/pedrro/followers","following_url":"https://api.github.com/users/pedrro/following{/other_user}","gists_url":"https://api.github.com/users/pedrro/gists{/gist_id}","starred_url":"https://api.github.com/users/pedrro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pedrro/subscriptions","organizations_url":"https://api.github.com/users/pedrro/orgs","repos_url":"https://api.github.com/users/pedrro/repos","events_url":"https://api.github.com/users/pedrro/events{/privacy}","received_events_url":"https://api.github.com/users/pedrro/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-08-01T20:51:11Z","updated_at":"2016-08-04T10:19:28Z","closed_at":null,"body":"Hi guys, i'm creating tests using the plugin of pact-jvm-provider for gradle. On pact-broker I have a pact with this body:\r\n\r\n```\r\n\"body\" : [ {\r\n        \"name\" : \"apmHpkclFKdJLAbCNdyS\",\r\n         \"address\" : \"apmHpkclFKdJLAbCNdyS\"\r\n      } ]\r\n```\r\n\r\nSo, when I run the request on provider, the request responde me the same body, but, with 2 objects inside array\r\n```\r\n\"body\" : [ {\r\n        \"name\" : \"apmHpkclFKdJLAbCNdyS\",\r\n         \"address\" : \"apmHpkclFKdJLAbCNdyS\"\r\n      },\r\n {\r\n        \"name\" : \"apmHpkclFKdJLAbCNdyS\",\r\n         \"address\" : \"apmHpkclFKdJLAbCNdyS\"\r\n      } ]\r\n```\r\n\r\nAnd it's giving me an error:\r\n\r\n>       $.body -> Expected a List with 1 elements but received 2 elements\r\n\r\nSo, my question is: **Should pact-jvm-provider validate how much data has inside the array?** In my opinion it should only validate the fields on array, not the length. How can avoid it?"},"comment":{"url":"https://api.github.com/repos/DiUS/pact-jvm/issues/comments/237513507","html_url":"https://github.com/DiUS/pact-jvm/issues/297#issuecomment-237513507","issue_url":"https://api.github.com/repos/DiUS/pact-jvm/issues/297","id":237513507,"user":{"login":"uglyog","id":863666,"avatar_url":"https://avatars.githubusercontent.com/u/863666?v=3","gravatar_id":"","url":"https://api.github.com/users/uglyog","html_url":"https://github.com/uglyog","followers_url":"https://api.github.com/users/uglyog/followers","following_url":"https://api.github.com/users/uglyog/following{/other_user}","gists_url":"https://api.github.com/users/uglyog/gists{/gist_id}","starred_url":"https://api.github.com/users/uglyog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uglyog/subscriptions","organizations_url":"https://api.github.com/users/uglyog/orgs","repos_url":"https://api.github.com/users/uglyog/repos","events_url":"https://api.github.com/users/uglyog/events{/privacy}","received_events_url":"https://api.github.com/users/uglyog/received_events","type":"User","site_admin":false},"created_at":"2016-08-04T10:19:28Z","updated_at":"2016-08-04T10:19:28Z","body":"That will be different for different people. Some people may need to specify the array size (think of logitude and latitude as an array with two values). Some may need to ensure that the array is never empty, or has a minimum or maximum size.\r\n\r\nWe use the example to base the matching on, and then have the matchers be able to extend it."}}
{"actor":{"display_login":"uglyog"}}