I'm developing an API as RESTful as possible (though the HATEOAS constraint is not met thus it is not a REST API per se)
I'm versioning the API, and since there are several ways to do this, I think I'm going to use the Accept header. I do know the alternatives, but the purpose of this question is not to find a suitable way to version the API.
As far as I know, there are two ways to version API using the Accept header, as seen here, here and here:
application/vnd.company.myapp-v1+json
or using a qualifier
application/vnd.company.myapp+json;v=1
While this is quite clear, I understood that all x-
custom content types have been deprecated and vnd.
content types have to be registered with IANA.
The API is not and will not be public, all the clients using it are developed internally.
Is registering a custom vnd. content type with IANA mandatory? What happens if the content type is not registered?
Can I simply use Accept header application/vnd.company.myapp+json;v=2
even without registering it with IANA?
Since I need a custom content type for content negociation purely for versioning purposes, can I use qualifier such as application/json;v=2
?
From what I can read from https://tools.ietf.org/html/rfc6838#section-3.2 it is not mandatory, however if you have and API that is public it is encouraged to do so.
RFC6838 is about registering new MIME/Media Types, with the following text it doesn't seem to be a problem for private API (product)
Also it is not required for the public API (product), like I said it is encouraged.