{"action":"created","issue":{"url":"https://api.github.com/repos/w3c/json-ld-syntax/issues/43","repository_url":"https://api.github.com/repos/w3c/json-ld-syntax","labels_url":"https://api.github.com/repos/w3c/json-ld-syntax/issues/43/labels{/name}","comments_url":"https://api.github.com/repos/w3c/json-ld-syntax/issues/43/comments","events_url":"https://api.github.com/repos/w3c/json-ld-syntax/issues/43/events","html_url":"https://github.com/w3c/json-ld-syntax/issues/43","id":348486696,"node_id":"MDU6SXNzdWUzNDg0ODY2OTY=","number":43,"title":"Content Negotiation for JSON-LD Context Documentation","user":{"login":"BigBlueHat","id":43209,"node_id":"MDQ6VXNlcjQzMjA5","avatar_url":"https://avatars1.githubusercontent.com/u/43209?v=4","gravatar_id":"","url":"https://api.github.com/users/BigBlueHat","html_url":"https://github.com/BigBlueHat","followers_url":"https://api.github.com/users/BigBlueHat/followers","following_url":"https://api.github.com/users/BigBlueHat/following{/other_user}","gists_url":"https://api.github.com/users/BigBlueHat/gists{/gist_id}","starred_url":"https://api.github.com/users/BigBlueHat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BigBlueHat/subscriptions","organizations_url":"https://api.github.com/users/BigBlueHat/orgs","repos_url":"https://api.github.com/users/BigBlueHat/repos","events_url":"https://api.github.com/users/BigBlueHat/events{/privacy}","received_events_url":"https://api.github.com/users/BigBlueHat/received_events","type":"User","site_admin":false},"labels":[{"id":999988150,"node_id":"MDU6TGFiZWw5OTk5ODgxNTA=","url":"https://api.github.com/repos/w3c/json-ld-syntax/labels/needs%20discussion","name":"needs discussion","color":"c5def5","default":false},{"id":965703045,"node_id":"MDU6TGFiZWw5NjU3MDMwNDU=","url":"https://api.github.com/repos/w3c/json-ld-syntax/labels/spec:enhancement","name":"spec:enhancement","color":"c11537","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-08-07T21:04:20Z","updated_at":"2018-08-10T16:53:23Z","closed_at":null,"author_association":"MEMBER","body":"This is one of the four documentation proposals discussed on August 3rd to answer questions/concerns in #32.\r\n\r\nThis approach is described in [Best Practice Recipes for Publishing RDF Namespace Vocabularies](https://www.w3.org/TR/swbp-vocab-pub/#negotiation). It is a popular approach currently in use by [Schema.org](https://schema.org/) as well as the W3C's [ActivityStream's 2.0 Vocabulary](https://www.w3.org/ns/activitystreams).\r\n\r\nThe Schema.org approach matches [Recipe 5. Extended configuration for a 'slash namespace', using multiple HTML documents](https://www.w3.org/TR/swbp-vocab-pub/#recipe5) described in the Best Practices document mentioned above. Browser requests to https://schema.org/ return the \"promo\" site for Schema.org which contains documentation for each term as well as community and process related content. Each individual term page also contains RDFa-encoded RDFS comments, labels, etc. Each of these URLs (the main site's URL and each term page's URL) may be content negotiated for a wide range of other RDF formats. See https://schema.org/docs/developers.html for more information.\r\n\r\nThe ActivityStreams 2.0 approach is a variation on [Recipe 3. Extended configuration for a 'hash namespace'](https://www.w3.org/TR/swbp-vocab-pub/#recipe3) where the returned single-page HTML file contains links with `id` attributes which match the term's name within the \"hash namespace\". So https://www.w3.org/ns/activitystreams#Activity is both the JSON-LD term's expanded IRI and also results in a link to the human-readable Activity class's documentation.\r\n\r\nThe basics of Content Negotiation are below--but better, more complete examples are contained in the Best Practices documentation above.\r\n\r\n#### Requesting Documentation\r\n```http\r\nGET /\r\nHost: schema.org\r\nAccept: text/html\r\n```\r\n(or `Accept: */*` in this case because HTML documentation is the default representation)\r\n\r\n```http\r\n200 OK\r\nContent-Type: text/html; charset=utf-8\r\n\r\n<!DOCTYPE html>...\r\n```\r\n\r\n#### Requesting the Context File\r\n\r\n```http\r\nGET /\r\nHost: schema.org\r\nAccept: application/ld+json\r\n```\r\n\r\n```http\r\n302 Found\r\nLocation: https://schema.org/docs/jsonldcontext.json\r\n```\r\n\r\n```http\r\n200 OK\r\nContent-Type: application/ld+json; charset=utf-8\r\n\r\n{\"@context\": \"...\"}\r\n```\r\n\r\n### Setup\r\n\r\nThis setup can be done via Apache ships with [mod_negotiation](https://httpd.apache.org/docs/current/mod/mod_negotiation.html) enabled--see their [Content Negotiation](https://httpd.apache.org/docs/current/content-negotiation.html) pages for more information.\r\n\r\nConfiguration is also possible for [Nginx](https://www.igvita.com/2013/05/01/deploying-webp-via-accept-content-negotiation/).\r\n\r\nAdditionally, most modern server-building frameworks for JS, Python, etc, include simple Content Negotiation enabling functions such as Express.js' [`res.format()`](https://expressjs.com/en/4x/api.html#res.format)."},"comment":{"url":"https://api.github.com/repos/w3c/json-ld-syntax/issues/comments/412141886","html_url":"https://github.com/w3c/json-ld-syntax/issues/43#issuecomment-412141886","issue_url":"https://api.github.com/repos/w3c/json-ld-syntax/issues/43","id":412141886,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMjE0MTg4Ng==","user":{"login":"BigBlueHat","id":43209,"node_id":"MDQ6VXNlcjQzMjA5","avatar_url":"https://avatars1.githubusercontent.com/u/43209?v=4","gravatar_id":"","url":"https://api.github.com/users/BigBlueHat","html_url":"https://github.com/BigBlueHat","followers_url":"https://api.github.com/users/BigBlueHat/followers","following_url":"https://api.github.com/users/BigBlueHat/following{/other_user}","gists_url":"https://api.github.com/users/BigBlueHat/gists{/gist_id}","starred_url":"https://api.github.com/users/BigBlueHat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BigBlueHat/subscriptions","organizations_url":"https://api.github.com/users/BigBlueHat/orgs","repos_url":"https://api.github.com/users/BigBlueHat/repos","events_url":"https://api.github.com/users/BigBlueHat/events{/privacy}","received_events_url":"https://api.github.com/users/BigBlueHat/received_events","type":"User","site_admin":false},"created_at":"2018-08-10T16:53:23Z","updated_at":"2018-08-10T16:53:23Z","author_association":"MEMBER","body":"Right. It would remain a best practice, not a requirement."}}
{"actor":{"display_login":"BigBlueHat"}}