I'm designing a RESTful API and in an attempt to be descriptive and make documentation clearer I want to declare my content-type http header as follows:
Content-Type: application/vnd.mycorp.mydatatype+json
where mycorp is an identifier unique to my corporation and mydatatype is unique to each data type. An example would be:
Content-Type: application/vnd.ford.car+json
{
"manufactured_year": 2000
, "color": "blue"
, "hp": 160
, "model" "Focus"
, "type": "sedan"
}
This content-type would be required in order for a POST to be valid and would be sent as a part of a response. It seems to me like a nice way to define rules for what should be inside the payload.
I can't seem to find a good resource on whether this is a good idea or if it is even allowed by IETF standards.
So, question is: Which is more feasible, application/vnd.mycorp.mydatatype+json or just application/json?