{"action":"opened","issue":{"url":"https://api.github.com/repos/springfox/springfox/issues/2278","repository_url":"https://api.github.com/repos/springfox/springfox","labels_url":"https://api.github.com/repos/springfox/springfox/issues/2278/labels{/name}","comments_url":"https://api.github.com/repos/springfox/springfox/issues/2278/comments","events_url":"https://api.github.com/repos/springfox/springfox/issues/2278/events","html_url":"https://github.com/springfox/springfox/issues/2278","id":302435311,"number":2278,"title":"Swagger UI 2.8.0 doesn´t show response working with ApiOperation","user":{"login":"mhersc1","id":5275538,"avatar_url":"https://avatars1.githubusercontent.com/u/5275538?v=4","gravatar_id":"","url":"https://api.github.com/users/mhersc1","html_url":"https://github.com/mhersc1","followers_url":"https://api.github.com/users/mhersc1/followers","following_url":"https://api.github.com/users/mhersc1/following{/other_user}","gists_url":"https://api.github.com/users/mhersc1/gists{/gist_id}","starred_url":"https://api.github.com/users/mhersc1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhersc1/subscriptions","organizations_url":"https://api.github.com/users/mhersc1/orgs","repos_url":"https://api.github.com/users/mhersc1/repos","events_url":"https://api.github.com/users/mhersc1/events{/privacy}","received_events_url":"https://api.github.com/users/mhersc1/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-03-05T19:45:06Z","updated_at":"2018-03-05T19:45:06Z","closed_at":null,"author_association":"NONE","body":"Hi every one\r\nI found a bug for this version 2.8.0, I use the following libraries springfox-swagger2 and springfox-swagger-ui (2.8.0) from Maven.\r\n\r\nI attach the code of my application\r\n`//Swagger Config Class\r\n@configuration\r\n@enableswagger2\r\npublic class SwaggerConfig {\r\n@bean\r\npublic Docket api() {\r\nreturn new Docket(DocumentationType.SWAGGER_2)\r\n.select()\r\n.apis(RequestHandlerSelectors.basePackage(\"xxxx.yyyy.zzzzz\"))\r\n.paths(PathSelectors.any())\r\n.build()\r\n.apiInfo(apiInfo())\r\n.securitySchemes(Collections.singletonList(apiKey()))\r\n.securityContexts(Collections.singletonList(securityContext()));\r\n}\r\n\r\nprivate SecurityContext securityContext() {\r\nreturn SecurityContext.builder()\r\n.securityReferences(defaultAuth())\r\n.forPaths(PathSelectors.regex(\"/anyPath.*\"))\r\n.build();\r\n}\r\n\r\nList defaultAuth() {\r\nAuthorizationScope authorizationScope\r\n= new AuthorizationScope(\"global\", \"accessEverything\");\r\nAuthorizationScope[] authorizationScopes = new AuthorizationScope[1];\r\nauthorizationScopes[0] = authorizationScope;\r\nreturn Collections.singletonList(new SecurityReference(\"Bearer\", authorizationScopes));\r\n}\r\n@bean\r\npublic ApiListingScannerPlugin listingScanner() {\r\nreturn new SwaggerManualApiPlugin();\r\n}\r\n}\r\n\r\n//SwaggerManualApiPlugin\r\npublic class SwaggerManualApiPlugin implements ApiListingScannerPlugin {\r\n@override\r\npublic List apply(DocumentationContext context) {\r\nreturn new ArrayList(\r\nArrays.asList(\r\nnew ApiDescription(\r\n\"/fondos/generartoken\",\r\n\"Generar Token Basic OAUTH\",\r\nArrays.asList(\r\nnew OperationBuilder(\r\nnew CachingOperationNameGenerator())\r\n.authorizations(new ArrayList())\r\n.codegenMethodNameStem(\"basicAuth0001\")\r\n.method(HttpMethod.POST)\r\n.notes(\"Endpoint responsable de la Autenticacion Básica de XXXXXX\")\r\n.parameters(\r\nArrays.asList(\r\nnew ParameterBuilder()\r\n.description(\"Basic Auth\")\r\n.type(new TypeResolver().resolve(String.class))\r\n.name(\"Authorization\")\r\n.defaultValue(\"Basic XXXXXXXXX\")\r\n.parameterType(\"header\")\r\n.parameterAccess(\"access\")\r\n.hidden(true)\r\n.required(true)\r\n.modelRef(new ModelRef(\"string\"))\r\n.build(),\r\nnew ParameterBuilder()\r\n.description(\"Tipo de Grant\")\r\n.type(new TypeResolver().resolve(String.class))\r\n.name(\"grant_type\")\r\n.defaultValue(\"password\")\r\n.required(true)\r\n.hidden(true)\r\n.parameterType(\"query\")\r\n.parameterAccess(\"access\")\r\n.modelRef(new ModelRef(\"string\"))\r\n.build(),\r\nnew ParameterBuilder()\r\n.description(\"Tipo de Documento\")\r\n.type(new TypeResolver().resolve(String.class))\r\n.name(\"tipoDocumento\")\r\n.parameterType(\"query\")\r\n.parameterAccess(\"access\")\r\n.required(true)\r\n.modelRef(new ModelRef(\"string\"))\r\n.build(),\r\nnew ParameterBuilder()\r\n.description(\"Numero de Documento\")\r\n.type(new TypeResolver().resolve(String.class))\r\n.name(\"numeroDocumento\")\r\n.parameterType(\"query\")\r\n.parameterAccess(\"access\")\r\n.required(true)\r\n.modelRef(new ModelRef(\"string\"))\r\n.build(),\r\nnew ParameterBuilder()\r\n.description(\"Origen del canal\")\r\n.type(new TypeResolver().resolve(String.class))\r\n.name(\"origen\")\r\n.defaultValue(\"web\")\r\n.parameterType(\"query\")\r\n.parameterAccess(\"access\")\r\n.required(true)\r\n.modelRef(new ModelRef(\"string\"))\r\n.build(),\r\nnew ParameterBuilder()\r\n.description(\"Codigo del canal\")\r\n.type(new TypeResolver().resolve(String.class))\r\n.name(\"canal\")\r\n.defaultValue(\"PLD000501\")\r\n.parameterType(\"query\")\r\n.parameterAccess(\"access\")\r\n.required(true)\r\n.modelRef(new ModelRef(\"string\"))\r\n.build()))\r\n.build()),\r\nfalse)));\r\n}\r\n\r\n@override\r\npublic boolean supports(DocumentationType delimiter) {\r\nreturn DocumentationType.SWAGGER_2.equals(delimiter);\r\n}\r\n}`\r\n\r\nThe problem here is that this new operation is creating is not showing response on version 2.8.0.\r\nI tried with version 2.7.0 and if it's showing response, however when I try with other operation the new operation's response dissapears, but this is not problem for me.\r\n\r\n![image](https://user-images.githubusercontent.com/5275538/36995926-745ba91c-2083-11e8-807f-32edc6e20fd4.png)\r\n\r\nMaybe I forgot any configuration, if so, throw me a cable.\r\nThanks in advance.\r\n"}}
{"actor":{"display_login":"mhersc1"}}