{"action":"created","issue":{"url":"https://api.github.com/repos/swagger-api/swagger-core/issues/1785","repository_url":"https://api.github.com/repos/swagger-api/swagger-core","labels_url":"https://api.github.com/repos/swagger-api/swagger-core/issues/1785/labels{/name}","comments_url":"https://api.github.com/repos/swagger-api/swagger-core/issues/1785/comments","events_url":"https://api.github.com/repos/swagger-api/swagger-core/issues/1785/events","html_url":"https://github.com/swagger-api/swagger-core/issues/1785","id":153911864,"number":1785,"title":"ApiImplicitParam does not display in Swagger UI (1.5.8)","user":{"login":"RichardAWilliamsMHE","id":19276970,"avatar_url":"https://avatars.githubusercontent.com/u/19276970?v=3","gravatar_id":"","url":"https://api.github.com/users/RichardAWilliamsMHE","html_url":"https://github.com/RichardAWilliamsMHE","followers_url":"https://api.github.com/users/RichardAWilliamsMHE/followers","following_url":"https://api.github.com/users/RichardAWilliamsMHE/following{/other_user}","gists_url":"https://api.github.com/users/RichardAWilliamsMHE/gists{/gist_id}","starred_url":"https://api.github.com/users/RichardAWilliamsMHE/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RichardAWilliamsMHE/subscriptions","organizations_url":"https://api.github.com/users/RichardAWilliamsMHE/orgs","repos_url":"https://api.github.com/users/RichardAWilliamsMHE/repos","events_url":"https://api.github.com/users/RichardAWilliamsMHE/events{/privacy}","received_events_url":"https://api.github.com/users/RichardAWilliamsMHE/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-05-10T02:35:51Z","updated_at":"2016-12-25T07:14:45Z","closed_at":"2016-12-25T07:14:45Z","body":"This issue has been reported before and has been reported as fixed in earlier releases, but it looks like it's come back.\n\nWe're running Swagger 1.5.8. (annotations, core, jaxrs, and models).\n\nUse Case: When a method is overloaded due to versioning, and both versions of the Service have the same ApiImplicitParam parameters, but different Consumes (one with 'V1', the other with 'V2'), and when ApiImplicitParam and ApiParam annotations are both present in the Service (Controller) definitions, then the ApiImplicitParam annotation is ignored for one definition (the V1 definition) and no parameters are displayed in the Swagger UI at all.\n\nWork-arounds identified:\nRemove the ApiParam annotations from the V1 definition.\n\nCode example:\n\n**First Declaration (the default overload)**\n\n```\n@ApiOperation(value = \"Search ...\",\n        notes = \"some notes here\",\n        authorizations = @Authorization(value = \"oAuth\"), consumes = ApiVersion.ApiVersionHeader.V_0_1, produces = ApiVersion.ApiVersionHeader.V_0_1)\n@ApiResponses(value = { @ApiResponse(code = 200, message = \"Success\", responseContainer = \"List\",response = UserEntity.class),\n        @ApiResponse(code = 400, message = \"No search parameters provided, or invalid search parameters provided\"),\n        @ApiResponse(code = 401, message = \"Login required\") })\n@ApiImplicitParams(value = {\n        @ApiImplicitParam(name = \"account\", value = \"The accountId to limit user searches over\", required = false, dataType = \"string\", defaultValue = \"\", paramType = \"query\"),\n        @ApiImplicitParam(name = \"firstName\", value = \"First name (or fragment thereof) for the search\", required = false, dataType = \"string\", defaultValue = \"\", paramType = \"query\"),\n        @ApiImplicitParam(name = \"lastName\", value = \"Last name (or fragment thereof) for the search\", required = false, dataType = \"string\", defaultValue = \"\", paramType = \"query\"),\n        @ApiImplicitParam(name = \"offset\", value = \"\", required = false, dataType = \"string\", defaultValue = \"0\", paramType = \"query\"),\n        @ApiImplicitParam(name = \"limit\", value = \"\", required = false, dataType = \"string\", defaultValue = \"100\", paramType = \"query\") })\n@GET\n@Path(\"/\")\n@Permission(\"SOMEPERMISSION1\")\npublic List<UserEntity> searchUser(@ApiParam(name = \"account\", value = \"\", hidden=true) @QueryParam(\"account\") EntityID accountId,\n                                   @ApiParam(name = \"firstName\", value = \"\", hidden=true) @QueryParam(\"firstName\") String firstName,\n                                   @ApiParam(name = \"lastName\", value = \"\", hidden=true) @QueryParam(\"lastName\") String lastName,\n                                   @Context HttpRequest req,\n                                   @ApiParam(hidden = true) Pagination pagination) {\n    return userService.searchUser(accountId, firstName, lastName, Pagination.ignore());\n}\n```\n\nThe result is the same with, or without, an \"_@Consumes(ApiVersion.ApiVersionHeader.V_0_1)_\" annotation.\n\n**Second Declaration (the new version)**\n\n```\n@ApiOperation(value = \"Search ...\",\n        notes = \"some notes here\",\n        authorizations = @Authorization(value = \"oAuth\"), consumes = ApiVersion.ApiVersionHeader.V_0_2, produces = ApiVersion.ApiVersionHeader.V_0_2)\n@ApiResponses(value = { @ApiResponse(code = 200, message = \"Success\", responseContainer = \"List\",response = UserEntity.class),\n        @ApiResponse(code = 400, message = \"No search parameters provided, or invalid search parameters provided\"),\n        @ApiResponse(code = 401, message = \"Login required\") })\n@ApiImplicitParams(value = {\n        @ApiImplicitParam(name = \"account\", value = \"The accountId to limit user searches over\", required = false, dataType = \"string\", defaultValue = \"\", paramType = \"query\"),\n        @ApiImplicitParam(name = \"firstName\", value = \"First name (or fragment thereof) for the search\", required = false, dataType = \"string\", defaultValue = \"\", paramType = \"query\"),\n        @ApiImplicitParam(name = \"lastName\", value = \"Last name (or fragment thereof) for the search\", required = false, dataType = \"string\", defaultValue = \"\", paramType = \"query\"),\n        @ApiImplicitParam(name = \"offset\", value = \"\", required = false, dataType = \"string\", defaultValue = \"0\", paramType = \"query\"),\n        @ApiImplicitParam(name = \"limit\", value = \"\", required = false, dataType = \"string\", defaultValue = \"100\", paramType = \"query\") })\n@Consumes(ApiVersion.ApiVersionHeader.V_0_2)\n@GET\n@Path(\"/\")\n@Permission(\"SOMEPERMISSION1\")\npublic List<UserEntity> searchUser(@ApiParam(name = \"account\", value = \"\", hidden=true) @QueryParam(\"account\") EntityID accountId,\n                                   @ApiParam(name = \"firstName\", value = \"\", hidden=true) @QueryParam(\"firstName\") String firstName,\n                                   @ApiParam(name = \"lastName\", value = \"\", hidden=true) @QueryParam(\"lastName\") String lastName,\n                                   @Context HttpRequest req,\n                                   @ApiParam(hidden = true) Pagination pagination) {\n    return userService.searchUser(accountId, firstName, lastName, pagination);\n}\n```\n\nNote that renaming the V2 end-point method as \"searchUserV2\" does not help Swagger resolve the issue either.\n"},"comment":{"url":"https://api.github.com/repos/swagger-api/swagger-core/issues/comments/269112709","html_url":"https://github.com/swagger-api/swagger-core/issues/1785#issuecomment-269112709","issue_url":"https://api.github.com/repos/swagger-api/swagger-core/issues/1785","id":269112709,"user":{"login":"fehguy","id":249413,"avatar_url":"https://avatars.githubusercontent.com/u/249413?v=3","gravatar_id":"","url":"https://api.github.com/users/fehguy","html_url":"https://github.com/fehguy","followers_url":"https://api.github.com/users/fehguy/followers","following_url":"https://api.github.com/users/fehguy/following{/other_user}","gists_url":"https://api.github.com/users/fehguy/gists{/gist_id}","starred_url":"https://api.github.com/users/fehguy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fehguy/subscriptions","organizations_url":"https://api.github.com/users/fehguy/orgs","repos_url":"https://api.github.com/users/fehguy/repos","events_url":"https://api.github.com/users/fehguy/events{/privacy}","received_events_url":"https://api.github.com/users/fehguy/received_events","type":"User","site_admin":false},"created_at":"2016-12-25T07:14:45Z","updated_at":"2016-12-25T07:14:45Z","body":"This is a common case and is well tested.  Please retest against 1.5.11"}}
{"actor":{"display_login":"fehguy"}}