Skip to content

Enhance WebTestClient to support JSONPath decoding to higher level objects #31653

Closed
@rstoyanchev

Description

@rstoyanchev

WebTestClient supports passing a target Class in JsonPathAssertions. We should add an overloaded method that accepts ParameterizedTypeReference. Also, even with the current method, it is only possible to decode to basic types without customizing the JSONPath Configuration.

Once it is possible to customize the JSONPath Configuration in JsonPathExpectationsHelper with #31651, we can update WebTestClient to prepare a Configuration with the JsonProvider that aligns with that configured JSON encoding and decoding, and/or allow having the Configuration passed in somehow through the WebTestClient.Builder (without bring in a hard dependency).

Metadata

Metadata

Labels

in: testIssues in the test modulein: webIssues in web modules (web, webmvc, webflux, websocket)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions