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
When asserting JSON content in a MockMvc, the provided MockMvcResultMatchers.jsonPath functions support automatic type deduction or an explicit Class<T> parameter (via #23141), but there is an additional version in JsonPath that supports a TypeRef generic and is not exposed. It would be very useful if it was, especially for containsInAnyOrder assertions of POJOs.
For this purpose, it would furthermore be useful if a POJO mapper was configured since afaics it isn't currently.
I've created #31651 and #31653 related to this. Given the need to pass a customized Configuration to JSONPath and the static nature of MockMvc, it might not be possible to make this too convenient, but we should be able to address it effectively in WebTestClient, which also works with MockMvc via MockMvcWebTestClient. We'll try and make it possible at least with MockMvc.
Uh oh!
There was an error while loading. Please reload this page.
Affects: 2.4.1
When asserting JSON content in a MockMvc, the provided
MockMvcResultMatchers.jsonPath
functions support automatic type deduction or an explicitClass<T>
parameter (via #23141), but there is an additional version in JsonPath that supports aTypeRef
generic and is not exposed. It would be very useful if it was, especially forcontainsInAnyOrder
assertions of POJOs.For this purpose, it would furthermore be useful if a POJO mapper was configured since afaics it isn't currently.
JsonPath Documentation
The text was updated successfully, but these errors were encountered: