Description
when accessing a compatible API a user has to specify a version its client is compatible with
Some people prefer to use a custom header for that purpose but it is also a common practice on the internet to use Accept and/or Content-Type for that purpose.
The argument against custom header is that it might often be filtered by firewalls or proxies.
This however might also happen with non IANA registered custom values of Accept/Content-Type.
There are several 'patterns' that people follow for values of Accept/Content-Type. Most popular are in a form:
application/vnd.elasticsearch.v7+json
- however if we ever decide to register our subtype then we would have to do it for every new version. Also does not indicate well enought that the API is only compatible.
application/vnd.elasticsearch+json; compatibleWith= 7
- this seems to be the most preferable to me, it indicates the intention that the API is not version 7 but only compatible. Also registration would be easier. The subtype will not change - vnd.elasticsearch and we will just define that compatibleWith expects a major version number.
relates #51816