{"action":"created","issue":{"url":"https://api.github.com/repos/OAI/OpenAPI-Specification/issues/738","repository_url":"https://api.github.com/repos/OAI/OpenAPI-Specification","labels_url":"https://api.github.com/repos/OAI/OpenAPI-Specification/issues/738/labels{/name}","comments_url":"https://api.github.com/repos/OAI/OpenAPI-Specification/issues/738/comments","events_url":"https://api.github.com/repos/OAI/OpenAPI-Specification/issues/738/events","html_url":"https://github.com/OAI/OpenAPI-Specification/issues/738","id":166160812,"number":738,"title":"Proposal: Support for HTTP compression","user":{"login":"michaelkourlas","id":1672388,"avatar_url":"https://avatars.githubusercontent.com/u/1672388?v=3","gravatar_id":"","url":"https://api.github.com/users/michaelkourlas","html_url":"https://github.com/michaelkourlas","followers_url":"https://api.github.com/users/michaelkourlas/followers","following_url":"https://api.github.com/users/michaelkourlas/following{/other_user}","gists_url":"https://api.github.com/users/michaelkourlas/gists{/gist_id}","starred_url":"https://api.github.com/users/michaelkourlas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaelkourlas/subscriptions","organizations_url":"https://api.github.com/users/michaelkourlas/orgs","repos_url":"https://api.github.com/users/michaelkourlas/repos","events_url":"https://api.github.com/users/michaelkourlas/events{/privacy}","received_events_url":"https://api.github.com/users/michaelkourlas/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-07-18T18:30:04Z","updated_at":"2016-07-28T14:15:07Z","closed_at":null,"body":"This is a proposal to add support for [HTTP compression](https://en.wikipedia.org/wiki/HTTP_compression) to version 3.0 of the OpenAPI specification.\r\n\r\n**Rationale for this change**\r\n\r\nAt present, there is no robust way to determine from an OpenAPI specification what HTTP encodings a server is willing to accept for requests or is willing to encode responses in.\r\n\r\nIt is possible to list the `Content-Encoding` and `Accept-Encoding` HTTP headers as optional parameters in request and response objects, but this approach is complex and difficult to understand. Moreover, other standard HTTP headers, such as `Accept`, `Content-Type` and `Authorization`, are already represented by dedicated `consumes`/`produces` and `security` attributes. \r\n\r\n**Proposed addition to the specification**\r\n\r\nOne way to implement support for HTTP compression would be to add a field to the OpenAPI Object called `\"compression\"` that maps to a Compression Object.\r\n\r\nThe Compression Object would have two fields, `\"consumes\"` and `\"produces\"`:\r\n* The `\"consumes\"` field would map to an array of strings; each string is an encoding that the API is willing to accept in HTTP requests. In other words, the server is prepared to accept requests with a `Content-Encoding` header with a value consisting of any one of the items in the array.\r\n* The `\"produces\"` field would map to an array of strings; each string is an encoding that the API is prepared to send in HTTP responses. In other words, the server is prepared to send responses with a `Content-Encoding` header with a value consisting of any one of the items in the array.\r\n\r\nIt may be a good idea to allow the global compression settings to be overridden on a per-path basis by adding a `\"compression\"` field to the Path Item Object as well.\r\n\r\n**Example**\r\n\r\nThe following snippet describes an API that can accept requests with a `Content-Encoding` of `gzip`, `deflate`, or `compress`, and is capable of sending responses with a `Content-Encoding` of `gzip` or `deflate`:\r\n```json\r\n\"compression\": {\r\n    \"consumes\": [\r\n        \"gzip\",\r\n        \"deflate\",\r\n        \"compress\"\r\n    ],\r\n    \"produces\": [\r\n        \"gzip\",\r\n        \"deflate\"\r\n    ]\r\n}\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/OAI/OpenAPI-Specification/issues/comments/235907132","html_url":"https://github.com/OAI/OpenAPI-Specification/issues/738#issuecomment-235907132","issue_url":"https://api.github.com/repos/OAI/OpenAPI-Specification/issues/738","id":235907132,"user":{"login":"ePaul","id":645859,"avatar_url":"https://avatars.githubusercontent.com/u/645859?v=3","gravatar_id":"","url":"https://api.github.com/users/ePaul","html_url":"https://github.com/ePaul","followers_url":"https://api.github.com/users/ePaul/followers","following_url":"https://api.github.com/users/ePaul/following{/other_user}","gists_url":"https://api.github.com/users/ePaul/gists{/gist_id}","starred_url":"https://api.github.com/users/ePaul/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ePaul/subscriptions","organizations_url":"https://api.github.com/users/ePaul/orgs","repos_url":"https://api.github.com/users/ePaul/repos","events_url":"https://api.github.com/users/ePaul/events{/privacy}","received_events_url":"https://api.github.com/users/ePaul/received_events","type":"User","site_admin":false},"created_at":"2016-07-28T14:15:07Z","updated_at":"2016-07-28T14:15:07Z","body":"Is `compression` the right name for this? Shouldn't this be more generally something like `transfer-encoding`?"}}
{"actor":{"display_login":"ePaul"}}