{"action":"created","issue":{"url":"https://api.github.com/repos/swagger-api/swagger-core/issues/1531","labels_url":"https://api.github.com/repos/swagger-api/swagger-core/issues/1531/labels{/name}","comments_url":"https://api.github.com/repos/swagger-api/swagger-core/issues/1531/comments","events_url":"https://api.github.com/repos/swagger-api/swagger-core/issues/1531/events","html_url":"https://github.com/swagger-api/swagger-core/issues/1531","id":114597704,"number":1531,"title":"@ApiParam of type InputStream needs special handling","user":{"login":"BigSocial","id":7011509,"avatar_url":"https://avatars.githubusercontent.com/u/7011509?v=3","gravatar_id":"","url":"https://api.github.com/users/BigSocial","html_url":"https://github.com/BigSocial","followers_url":"https://api.github.com/users/BigSocial/followers","following_url":"https://api.github.com/users/BigSocial/following{/other_user}","gists_url":"https://api.github.com/users/BigSocial/gists{/gist_id}","starred_url":"https://api.github.com/users/BigSocial/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BigSocial/subscriptions","organizations_url":"https://api.github.com/users/BigSocial/orgs","repos_url":"https://api.github.com/users/BigSocial/repos","events_url":"https://api.github.com/users/BigSocial/events{/privacy}","received_events_url":"https://api.github.com/users/BigSocial/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-11-02T13:51:38Z","updated_at":"2015-11-03T00:12:26Z","closed_at":null,"body":"This Java/Jersey code...\r\n\r\n    @POST\r\n    @Path(\"/bin\")\r\n    @Consumes({MediaType.APPLICATION_OCTET_STREAM})\r\n    @Produces({MediaType.APPLICATION_JSON})\r\n    @ApiOperation(\r\n\t\t\tvalue = \"Create a new Source from an uploaded file. This version expects the file as the raw contents of the request.\",\r\n\t\t\tresponse = Source.class\r\n\t\t\t)\r\n\tpublic Response makeSourceRaw(\r\n\t\t\t@ApiParam(value = \"A file\", required = true) InputStream inputStream\r\n\t\t\t)\r\n\r\n...works perfectly (i.e. it allows access to the unencoded body) but currently generates this Swagger 2.0...\r\n\r\n    parameters: [\r\n        {\r\n            in: \"body\",\r\n            name: \"body\",\r\n            description: \"A file\",\r\n            required: true,\r\n            schema: {\r\n                 $ref: \"#/definitions/InputStream\"\r\n            }\r\n        }\r\n    ]\r\n\r\nThe result is Swagger UI generates the unhelpful...\r\n\r\n![image](https://cloud.githubusercontent.com/assets/7011509/10124143/196b081e-6513-11e5-9e14-6735b10c5ef5.png)\r\n\r\n...and swagger-codegen generates a Java client that treats InputStream as if it were part of my model (i.e. creates a io.swagger.client.model.InputStream class), not an important concept in Java/Jersey. \r\n\r\nIs there any way right now to make Swagger (core, UI, codegen, etc.) understand that an InputStream param should be treated as a \"raw\" file upload? If not, consider this a issue. \r\n\r\nAlso see my original comment on Sep 27 2015 here swagger-api/swagger-spec#326"},"comment":{"url":"https://api.github.com/repos/swagger-api/swagger-core/issues/comments/153200720","html_url":"https://github.com/swagger-api/swagger-core/issues/1531#issuecomment-153200720","issue_url":"https://api.github.com/repos/swagger-api/swagger-core/issues/1531","id":153200720,"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":"2015-11-03T00:12:26Z","updated_at":"2015-11-03T00:12:26Z","body":"What are your dependencies?  If you're not using the swagger-jersey-jaxrs module, I'd expect to see this behavior, which is indeed not helpful.  But in the module, you'll see that a `FormDataParam` with type `InputStream` should convert to the `file` type.\r\n\r\nhttps://github.com/swagger-api/swagger-core/blob/master/modules/swagger-jersey-jaxrs/src/main/java/io/swagger/jersey/SwaggerJerseyJaxrs.java"}}