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
The multipart request may contain not only files
The current pact version doesn't differentiate Parameters and Files objects for MockMultipartHttpServletRequestBuilder and adds all request parameters as files
As a result, the pact contract can't be used correctly for API healthiness measurement
while (i < multipart.count) {
val bodyPart = multipart.getBodyPart(i)
val contentDisposition = ContentDisposition(bodyPart.getHeader("Content-Disposition").first())
val name = StringUtils.defaultString(contentDisposition.getParameter("name"), "file")
val filename = contentDisposition.getParameter("filename").orEmpty()
multipartRequest.file(MockMultipartFile(name, filename, bodyPart.contentType, bodyPart.inputStream))
i++
}
The multipart request may contain not only files
The current pact version doesn't differentiate Parameters and Files objects for
MockMultipartHttpServletRequestBuilder
and adds all request parameters as filesAs a result, the pact contract can't be used correctly for API healthiness measurement
pact-jvm/provider/spring/src/main/kotlin/au/com/dius/pact/provider/spring/MvcProviderVerifier.kt
Line 89 in 7427a2c
Example:
Web HTTP
Expected mock build:
Actual mock build:
The text was updated successfully, but these errors were encountered: