{"action":"created","issue":{"url":"https://api.github.com/repos/swagger-api/swagger-ui/issues/2502","repository_url":"https://api.github.com/repos/swagger-api/swagger-ui","labels_url":"https://api.github.com/repos/swagger-api/swagger-ui/issues/2502/labels{/name}","comments_url":"https://api.github.com/repos/swagger-api/swagger-ui/issues/2502/comments","events_url":"https://api.github.com/repos/swagger-api/swagger-ui/issues/2502/events","html_url":"https://github.com/swagger-api/swagger-ui/issues/2502","id":189703746,"number":2502,"title":"Swagger2 -  Not acceptable 406 issue","user":{"login":"vandana09","id":23499730,"avatar_url":"https://avatars.githubusercontent.com/u/23499730?v=3","gravatar_id":"","url":"https://api.github.com/users/vandana09","html_url":"https://github.com/vandana09","followers_url":"https://api.github.com/users/vandana09/followers","following_url":"https://api.github.com/users/vandana09/following{/other_user}","gists_url":"https://api.github.com/users/vandana09/gists{/gist_id}","starred_url":"https://api.github.com/users/vandana09/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vandana09/subscriptions","organizations_url":"https://api.github.com/users/vandana09/orgs","repos_url":"https://api.github.com/users/vandana09/repos","events_url":"https://api.github.com/users/vandana09/events{/privacy}","received_events_url":"https://api.github.com/users/vandana09/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-11-16T13:28:33Z","updated_at":"2016-11-18T06:34:59Z","closed_at":"2016-11-18T06:34:59Z","body":"Hi I am getting \"The resource identified by this request is only capable of generating responses with characteristics not acceptable according to the request \"accept\" headers\" error i.e Http 406 not acceptable. \r\n\r\nI am using spring 4, Springfox 2.4.0\r\n\r\nMy swagger config file is as below\r\n```java\r\n@EnableSwagger2\r\n@Configuration\r\npublic class SwaggerConfig {\r\n\t\r\n\t @Bean\r\n\t    public Docket api() { \r\n\t        return new Docket(DocumentationType.SWAGGER_2)  \r\n\t          .select()                                  \r\n\t          .apis(RequestHandlerSelectors.any())              \r\n\t          .paths(PathSelectors.any())                          \r\n\t          .build();                                           \r\n\t    }\r\n```\r\n\r\n```xml\r\n<beans xmlns=\"http://www.springframework.org/schema/beans\"\r\n\txmlns:mvc=\"http://www.springframework.org/schema/mvc\" xmlns:context=\"http://www.springframework.org/schema/context\"\r\n\txmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\r\n\txsi:schemaLocation=\"\r\n        http://www.springframework.org/schema/beans \r\n        http://www.springframework.org/schema/beans/spring-beans-4.1.xsd\r\n        http://www.springframework.org/schema/context   \r\n        http://www.springframework.org/schema/context/spring-context-4.1.xsd\r\n        http://www.springframework.org/schema/mvc\r\n        http://www.springframework.org/schema/mvc/spring-mvc-4.1.xsd\">\r\n\t<context:component-scan base-package=\"com.fmrco.research.search\" />\r\n\t<bean id=\"swaggerConfig\" class=\"com.fmrco.research.search.swagger.SwaggerConfig\">\r\n\t\t<!-- <property name=\"basePackage\" value=\"com.fmrco.research.search\" /> \r\n\t\t\t<property name=\"serviceAPITitle\" value=\"API - Swagger service\" /> <property \r\n\t\t\tname=\"serviceDescription\" value=\"This is a Swagger-enabled API representation \r\n\t\t\tfor Swagger POC\" /> <property name=\"serviceVersion\" value=\"1.0\" /> <property \r\n\t\t\tname=\"consumptionFormat\" value=\"application/json\" /> -->\r\n\t</bean>\r\n\t<mvc:annotation-driven />\r\n\t<context:annotation-config />\r\n\t<mvc:resources mapping=\"swagger-ui.html\" location=\"classpath:/META-INF/resources/\" />\r\n\t<mvc:resources mapping=\"/webjars/**\"\r\n\t\tlocation=\"classpath:/META-INF/resources/webjars/\" />\r\n</beans>\r\n```\r\nMy controller definition is as below \r\n```java\r\n @RequestMapping(value = \"/{dataSource}/search\", method = {\r\n            RequestMethod.GET, RequestMethod.POST })\r\n    public ResponseEntity<?> search(\r\n            @PathVariable(\"dataSource\") String dataSource,\r\n            @RequestParam @RequestBody MultiValueMap<String, String> allRequestParams,\r\n            @RequestHeader HttpHeaders headers) { ...\r\n            }\r\n```\r\n\r\nAlso CORS filter is setup.  Anything is missing ? How do i resolve this\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/swagger-api/swagger-ui/issues/comments/261459795","html_url":"https://github.com/swagger-api/swagger-ui/issues/2502#issuecomment-261459795","issue_url":"https://api.github.com/repos/swagger-api/swagger-ui/issues/2502","id":261459795,"user":{"login":"webron","id":241629,"avatar_url":"https://avatars.githubusercontent.com/u/241629?v=3","gravatar_id":"","url":"https://api.github.com/users/webron","html_url":"https://github.com/webron","followers_url":"https://api.github.com/users/webron/followers","following_url":"https://api.github.com/users/webron/following{/other_user}","gists_url":"https://api.github.com/users/webron/gists{/gist_id}","starred_url":"https://api.github.com/users/webron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/webron/subscriptions","organizations_url":"https://api.github.com/users/webron/orgs","repos_url":"https://api.github.com/users/webron/repos","events_url":"https://api.github.com/users/webron/events{/privacy}","received_events_url":"https://api.github.com/users/webron/received_events","type":"User","site_admin":false},"created_at":"2016-11-18T06:34:59Z","updated_at":"2016-11-18T06:34:59Z","body":"I suggest opening the ticket on [Springfox](https://github.com/springfox/springfox) and if they find an issue related to swagger-ui, you can reopen this one."}}
{"actor":{"display_login":"webron"}}