w3c / w3c-api

The W3C API
https://w3c.github.io/w3c-api/
209 stars 91 forks source link

Use specific media type for the W3C API #36

Open vivienlacourba opened 9 years ago

vivienlacourba commented 9 years ago

Following discussions started with @tripu on issue #29 I went to the conclusion that it will make things easier if the W3C API had its own media type. That way we could clearly identify when link relations points to another W3C API resource (using the type property on link objects).

@dontcallmedom also suggested we include the API version in the media type as done by GitHub.

FYI, several popular APIs are using their own media type:

Proposed W3C API media type: application/vnd.org.w3.api.v1+json

Explanation:

vivienlacourba commented 9 years ago

Issue description updated as I actually forgot the version number, and also after some thought having hal in the media type seemed like an overkill, it would have been either:

vivienlacourba commented 9 years ago

For future thoughts the JSON-LD media type is application/ld+json.

akuckartz commented 8 years ago

Please do not create YAMT (Yet Another Media Type). Use application/ld+json. Thanks.

tripu commented 8 years ago

:+1: to reuse an existing media type (application/hal+json).

tripu commented 7 years ago

FWIW, my two API clients don't need this any more; cf https://github.com/w3c/w3c-api/issues/29#issuecomment-277301730.