ePages-de / restdocs-wiremock

Spring REST Docs WireMock Integration
Apache License 2.0
75 stars 27 forks source link

ContentType is stripped when using custom vendor and version format #50

Closed carlosjgp closed 6 years ago

carlosjgp commented 7 years ago

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

otrosien commented 7 years ago

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

otrosien commented 6 years ago

@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.