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?

That doesn't belong in this PR because #35624 is specifically about adding a JsonContentAssert 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 the case, they should implement a common interface, but they don't.

@rstoyanchev
Copy link
Contributor

rstoyanchev commented Oct 28, 2025

@donalmurtagh thanks for the suggested change, but I'll close this for now, and we'll keep the discussion under the issue. What you're bringing up goes beyond JSON content and needs to be considered more broadly.

This PR and the branch is still here for us to refer to.

@rstoyanchev rstoyanchev added status: superseded An issue that has been superseded by another and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Oct 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: superseded An issue that has been superseded by another

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants