{"action":"created","issue":{"url":"https://api.github.com/repos/spring-projects/spring-restdocs/issues/71","labels_url":"https://api.github.com/repos/spring-projects/spring-restdocs/issues/71/labels{/name}","comments_url":"https://api.github.com/repos/spring-projects/spring-restdocs/issues/71/comments","events_url":"https://api.github.com/repos/spring-projects/spring-restdocs/issues/71/events","html_url":"https://github.com/spring-projects/spring-restdocs/issues/71","id":79805612,"number":71,"title":"Support request and response headers documentation","user":{"login":"andreasevers","id":6663110,"avatar_url":"https://avatars.githubusercontent.com/u/6663110?v=3","gravatar_id":"","url":"https://api.github.com/users/andreasevers","html_url":"https://github.com/andreasevers","followers_url":"https://api.github.com/users/andreasevers/followers","following_url":"https://api.github.com/users/andreasevers/following{/other_user}","gists_url":"https://api.github.com/users/andreasevers/gists{/gist_id}","starred_url":"https://api.github.com/users/andreasevers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andreasevers/subscriptions","organizations_url":"https://api.github.com/users/andreasevers/orgs","repos_url":"https://api.github.com/users/andreasevers/repos","events_url":"https://api.github.com/users/andreasevers/events{/privacy}","received_events_url":"https://api.github.com/users/andreasevers/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/spring-projects/spring-restdocs/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/spring-projects/spring-restdocs/milestones/4","html_url":"https://github.com/spring-projects/spring-restdocs/milestones/1.1.0.M1","labels_url":"https://api.github.com/repos/spring-projects/spring-restdocs/milestones/4/labels","id":1294992,"number":4,"title":"1.1.0.M1","description":"","creator":{"login":"wilkinsona","id":914682,"avatar_url":"https://avatars.githubusercontent.com/u/914682?v=3","gravatar_id":"","url":"https://api.github.com/users/wilkinsona","html_url":"https://github.com/wilkinsona","followers_url":"https://api.github.com/users/wilkinsona/followers","following_url":"https://api.github.com/users/wilkinsona/following{/other_user}","gists_url":"https://api.github.com/users/wilkinsona/gists{/gist_id}","starred_url":"https://api.github.com/users/wilkinsona/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wilkinsona/subscriptions","organizations_url":"https://api.github.com/users/wilkinsona/orgs","repos_url":"https://api.github.com/users/wilkinsona/repos","events_url":"https://api.github.com/users/wilkinsona/events{/privacy}","received_events_url":"https://api.github.com/users/wilkinsona/received_events","type":"User","site_admin":false},"open_issues":4,"closed_issues":0,"state":"open","created_at":"2015-09-08T09:27:36Z","updated_at":"2015-09-08T14:04:51Z","due_on":null,"closed_at":null},"comments":3,"created_at":"2015-05-23T10:23:37Z","updated_at":"2015-09-11T19:54:03Z","closed_at":null,"body":"Similar as documenting fields on top of links, headers are also useful to document.\r\n\r\nEspecially for versioning through content negotiation and JWT tokens it's important to be have documentation of required headers.\r\n\r\nI could create a PR if this is a feature that fits into spring restdocs."},"comment":{"url":"https://api.github.com/repos/spring-projects/spring-restdocs/issues/comments/139646843","html_url":"https://github.com/spring-projects/spring-restdocs/issues/71#issuecomment-139646843","issue_url":"https://api.github.com/repos/spring-projects/spring-restdocs/issues/71","id":139646843,"user":{"login":"andreasevers","id":6663110,"avatar_url":"https://avatars.githubusercontent.com/u/6663110?v=3","gravatar_id":"","url":"https://api.github.com/users/andreasevers","html_url":"https://github.com/andreasevers","followers_url":"https://api.github.com/users/andreasevers/followers","following_url":"https://api.github.com/users/andreasevers/following{/other_user}","gists_url":"https://api.github.com/users/andreasevers/gists{/gist_id}","starred_url":"https://api.github.com/users/andreasevers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andreasevers/subscriptions","organizations_url":"https://api.github.com/users/andreasevers/orgs","repos_url":"https://api.github.com/users/andreasevers/repos","events_url":"https://api.github.com/users/andreasevers/events{/privacy}","received_events_url":"https://api.github.com/users/andreasevers/received_events","type":"User","site_admin":false},"created_at":"2015-09-11T19:54:03Z","updated_at":"2015-09-11T19:54:03Z","body":"During implementation, the following question comes up:\r\nCan we apply the same assertions on headers as fields and links? Does it make sense to fail the build if a request or response header hasn't been documented?\r\n\r\nAmong others, the response header \"Content-Length\" doesn't seem worthy of being documented.\r\n\r\nPerhaps a less strict validation should be applied for headers. How about asserting that the ones that are documented should be present in the operation, but those which are extra in the operation should be ignored for the assertion?"}}