You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
wilkinsona
changed the title
Documentation for Request Parts mentions 'multipart' instead of 'fileUpload'
RestDocumentationRequestBuilders' methods for multipart file uploads are not aligned with MockMvc's MockMvcRequestBuilders
Jan 7, 2022
Thanks, @marcgemis. Rather than changing the docs, I think that RestDocumentationRequestBuilders should be updated so that it offers multipart methods. The existing fileUpload methods should probably be deprecated as well to keep things closely aligned with MockMvcRequestBuilders.
The documentation under https://docs.spring.io/spring-restdocs/docs/2.0.5.RELEASE/reference/html5/#documenting-your-api-request-parts for MockMvc has
this.mockMvc.perform(multipart("/upload").file("file", "example".getBytes()))
I think this should be
this.mockMvc.perform(fileUpload("/upload").file("file", "example".getBytes()))
as fileUpload is defined in RestDocumentationRequestBuilders and multipart in MockMvcRequestBuilders
The text was updated successfully, but these errors were encountered: