Closed dev-priporov closed 4 years ago
Hi, @dev-priporov thanks for reporting it. This is, indeed, a bug. At the same time, this use-case seems to be a rather rare corner-case. So we are going to fix it, but not as a priority. In the meantime, we suggest providing BodyMatchers as a workaround (and in the jsonPath, specifying the array element indexes for each match).
Is this problem still open? I think we've fixed a similar issue in the meantime. @dev-priporov can you check out the latest snapshots please?
@marcingrzejszczak I will check late, sorry now really have no time for that
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.
@marcingrzejszczak Hi, sorry for making that so late. I've updated the version and tried check the issue, but seems that now generated contract test is invalid.
to reproduce that you can use https://github.com/dev-priporov/scc-empty-array-issue project
Hi @epm-dev-priporov Thanks; looks like a bug. We will work on a fix.
If autogenerated test gets an expected body with 2 arrays with the same names, but one of them is an empty, the test will failed. Seems that the trouble is in jsonassert actually, but I think SCC should avoid that problem. The screen shows the line where the test fails.
Also I made a simple git project which helps to reproduce the issue: https://github.com/dev-priporov/scc-empty-array-issue