The problem with custom media type is that you will need also a custom client that can understand it. When a client receives response with content-type: application/vnd.my-syper-type it can't make any assumptions about it. If it json based or not and where to find links. Along with it client should understand semantics of message (i.e. "what is this field means?")
When you use a standard type you can leverage this problem and if the client knows about type, it can work with multiple apps and only needs to understand semantics of each. For semantics you can define your profile instead of defining whole media type.
If it's ok for you, there is not a crime to use custom one.
For me it is not erosion it's direction to code reuse :)
Roy Fielding talks a lot about media types (for example, here ). But what I've noticed is that people in this groups (and similar) almost never talk about custom media types for their specific APIs, but talk about some general hypermedia formats (like HAL, Syren and others).So, my question would be. Has an initial role and value of media types been eroded over recent years and we as a community don't want to have custom media types defined (describing 'processing rules', link rels etc) or am I missing something in this regard? Shouldn't we start designing a new API with a media type design (even based on some existing one or extending existing one)?
--
You received this message because you are subscribed to the Google Groups "API Craft" group.
To unsubscribe from this group and stop receiving emails from it, send an email to api-craft+...@googlegroups.com.
Visit this group at http://groups.google.com/group/api-craft.
For more options, visit https://groups.google.com/d/optout.
--