ePages-de/restdocs-wiremock

ContentType is stripped when using custom vendor and version format

Closed this issue · 2 comments

ContentType of my service uses the format:
application/com.carlosjgp.myservice+json; version=1.0

but the wiremock-stub.json file only contains
json; version=1.0

Versions
Spring Boot: 1.4.5-RELEASE
Spring Rest docs: 1.1.2-RELEASE
restdocs-wiremock: 0.7.18

Thanks for reporting. Content-Type parsing is sub-optimal at the moment. We'll look into that shortly.

@carlosjgp the wiremock snippet uses a "contains" check. We deliberately made this a fuzzy check to allow the snippet to be used in scenarios where the clients send a slightly different content-type (e.g. allow both application/com.carlosjgp.myservice+json and application/json)

As a quick-fix I'll propose to also strip the suffix (version in your case). PR is coming shortly.