Closed as not planned
Description
I just stumbled accross this when moving a test from MockMvc to MockMvcWebTestClient.
As far as I could see the AutoConfigureRestDocs for WebTestClient only works in a reactive web app. It's not a big deal, as I could workaround like
@ExtendWith(RestDocumentationExtension.class)
@WebMvcTest(CustomerApiController.class)
class CustomerApiControllerTest {
private WebTestClient client;
@Autowired
MockMvc mockMvc;
@BeforeEach
public void setUp(RestDocumentationContextProvider restDocumentation) {
this.client = MockMvcWebTestClient.bindTo(mockMvc).baseUrl("http://localhost")
.filter(documentationConfiguration(restDocumentation))
.build();
}
Can you imagine providing something like this with the AutoConfiguration?