Skip to content

Conversation

donalmurtagh
Copy link
Contributor

@donalmurtagh donalmurtagh commented Oct 17, 2025

See issue #35624

@donalmurtagh donalmurtagh changed the title Add a method to RestTestClient API that provides a JsonContentAssert #35624 Add a method to RestTestClient API that provides a JsonContentAssert Oct 17, 2025
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Oct 17, 2025
@donalmurtagh donalmurtagh changed the title Add a method to RestTestClient API that provides a JsonContentAssert Add a method to RestTestClient API that provides a JsonContentAssert Oct 17, 2025
@donalmurtagh donalmurtagh marked this pull request as ready for review October 17, 2025 11:33
@vpelikh
Copy link

vpelikh commented Oct 18, 2025

I very much miss JsonContent assertions, and this is an awesome change. @donalmurtagh, while you are on it, can you also add the same method to WebTestClient? I think the reactive and imperative test clients should have symmetrical API.

@donalmurtagh
Copy link
Contributor Author

donalmurtagh commented Oct 18, 2025

I very much miss JsonContent assertions

You can still use them (without this new method). The "Current Workaround" section of #35624 shows how.

can you also add the same method to WebTestClient?

The issue I raised is specifically about adding this method to RestTestClient. I'd rather wait and see whether this PR is accepted before adding a similar method to WebTestClient.

I think the reactive and imperative test clients should have symmetrical API.

If that's supposed to be the case, they should implement a common interface, but they don't.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: waiting-for-triage An issue we've not yet triaged or decided on

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants