{"action":"closed","issue":{"url":"https://api.github.com/repos/RSuter/NSwag/issues/1249","repository_url":"https://api.github.com/repos/RSuter/NSwag","labels_url":"https://api.github.com/repos/RSuter/NSwag/issues/1249/labels{/name}","comments_url":"https://api.github.com/repos/RSuter/NSwag/issues/1249/comments","events_url":"https://api.github.com/repos/RSuter/NSwag/issues/1249/events","html_url":"https://github.com/RSuter/NSwag/issues/1249","id":310315253,"number":1249,"title":"Add header into parameter (ASP.NET Web API)","user":{"login":"ubeyou","id":935938,"avatar_url":"https://avatars0.githubusercontent.com/u/935938?v=4","gravatar_id":"","url":"https://api.github.com/users/ubeyou","html_url":"https://github.com/ubeyou","followers_url":"https://api.github.com/users/ubeyou/followers","following_url":"https://api.github.com/users/ubeyou/following{/other_user}","gists_url":"https://api.github.com/users/ubeyou/gists{/gist_id}","starred_url":"https://api.github.com/users/ubeyou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ubeyou/subscriptions","organizations_url":"https://api.github.com/users/ubeyou/orgs","repos_url":"https://api.github.com/users/ubeyou/repos","events_url":"https://api.github.com/users/ubeyou/events{/privacy}","received_events_url":"https://api.github.com/users/ubeyou/received_events","type":"User","site_admin":false},"labels":[{"id":255705718,"url":"https://api.github.com/repos/RSuter/NSwag/labels/bug","name":"bug","color":"d93f0b","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-04-01T10:57:57Z","updated_at":"2018-04-01T20:44:26Z","closed_at":"2018-04-01T20:44:26Z","author_association":"NONE","body":"Just moved my swagger dependency to NSwag. It's great, however, there is no way to add a header (e.g X-Auth-User) as parameter for ASP.NETin Swagger UI. As FromHeader only available for ASP.NET Core, what's the way to display header param?\r\n\r\nI tried custom FromHeaderAttribute but it fails.\r\n`public IHttpActionResult PostAuthentication([FromHeader(\"X-Auth-User\")] string username)`\r\n\r\n\r\nin Swashbuckle, it can use IOperationFilter and \r\n```\r\n operation.parameters.Add(new Parameter\r\n                {\r\n                    name = \"X-Auth-User\",\r\n                    @in = \"header\",\r\n                    type = \"string\",\r\n                    required = true\r\n                });\r\n```\r\n"}}
{"actor":{"display_login":"RSuter"}}