Christopher Smith opened SPR-12096 and commented
Current best practice is to version REST APIs by media type (application/vnd.example.person-v1+json), but the RestTemplate does not provide a simple mechanism for indicating the Accept header for an entity type when using a general-purpose converter (such as Jackson). Instead, the AcceptHeaderRequestCallback will add all potentially matching media types to the Accept header.
It should be possible to annotate an entity class to specify the media type that RestTemplate will request from the server so that older clients will not send an unversioned request that they can't understand:
@EntityMediaType("application/vnd.example.person-v1+json")
public class Person {
// stuff
}
Affects: 4.0.6
Issue Links:
0 votes, 5 watchers
Christopher Smith opened SPR-12096 and commented
Current best practice is to version REST APIs by media type (
application/vnd.example.person-v1+json), but the RestTemplate does not provide a simple mechanism for indicating theAcceptheader for an entity type when using a general-purpose converter (such as Jackson). Instead, theAcceptHeaderRequestCallbackwill add all potentially matching media types to theAcceptheader.It should be possible to annotate an entity class to specify the media type that RestTemplate will request from the server so that older clients will not send an unversioned request that they can't understand:
Affects: 4.0.6
Issue Links:
0 votes, 5 watchers