Closed mustaphazorgati closed 3 years ago
I just did some research about media types and their compatibility. According to RFC6839:
The suffix "+json" MAY be used with any media type whose representation follows that established for "application/json"
Your incentive that a spring utility must provide it made me stumple across this issue. According to that issue some other RFCs (not listed) define that "application/hal+json" is not compatible with "application/json". Even tho they share the same syntax (stated in RFC6839). I suggest changing the predicate to the recommended one within that issue.
How does that sound?
Thanks for digging into this. That suggestion on the linked issue sounds like it will solve it.
@jmisur PR is ready for review :)
Please check the Travis log - ResponseModifyingPreprocessorsTest failed.
My bad. I didn't read properly earlier today. In order to support any +json structured Syntax Suffix (which is something else using the json syntax) we have to test two compatiblities: Without any suffix application/json
and with any suffix application/*+json
.
The referenced issue said that according to the RFCs application/*+json
is compatible to application/hal+json
.
I added some tests to explicitly show the new compatibility for both cases. I hope this is fine with you.
Since I didn't find any existing test class I didn't bother writing a test..