Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documenting path parameters does not work with MockMvcTester's fluent API #939

Closed
wilkinsona opened this issue Sep 9, 2024 · 4 comments
Closed
Milestone

Comments

@wilkinsona
Copy link
Member

It works if you use MockMvcTester.perform(RequestBuilder) and RestDocumentationRequestBuilders but this loses much of the benefit of MockMvcTester as you then can't use its fluent API to build the request.

spring-projects/spring-framework#33509 will make the URI template, if any, available from MockHttpServletRequest. REST Docs should use it with Framework 6.2. This will allow the fluent MockMvcTester API to be used to build the request and also remove the need for RestDocumentationRequestBuilders when using Framework 6.2.

@wilkinsona wilkinsona added this to the 3.0.x milestone Sep 9, 2024
@eiswind
Copy link

eiswind commented Sep 28, 2024

@wilkinsona is there an artifact available that I can use to crosscheck my tests? It doesn't seem to come with 3.0.1.

@wilkinsona wilkinsona modified the milestones: 3.0.x, 3.0.2 Sep 28, 2024
@wilkinsona
Copy link
Member Author

That's to be expected as 3.0.1 was released in November 2023. Please try with 3.0.2-SNAPSHOT that's available from https://repo.spring.io/snapshot.

@eiswind
Copy link

eiswind commented Sep 28, 2024

Thx. Works like a charm.

@wilkinsona
Copy link
Member Author

That's good to hear. Thanks for trying the snapshot.

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

No branches or pull requests

2 participants