{"action":"created","issue":{"url":"https://api.github.com/repos/Romakita/ts-express-decorators/issues/389","repository_url":"https://api.github.com/repos/Romakita/ts-express-decorators","labels_url":"https://api.github.com/repos/Romakita/ts-express-decorators/issues/389/labels{/name}","comments_url":"https://api.github.com/repos/Romakita/ts-express-decorators/issues/389/comments","events_url":"https://api.github.com/repos/Romakita/ts-express-decorators/issues/389/events","html_url":"https://github.com/Romakita/ts-express-decorators/issues/389","id":330982181,"node_id":"MDU6SXNzdWUzMzA5ODIxODE=","number":389,"title":"[Question] Multipart + Swagger","user":{"login":"TomerAmirV","id":19464891,"node_id":"MDQ6VXNlcjE5NDY0ODkx","avatar_url":"https://avatars3.githubusercontent.com/u/19464891?v=4","gravatar_id":"","url":"https://api.github.com/users/TomerAmirV","html_url":"https://github.com/TomerAmirV","followers_url":"https://api.github.com/users/TomerAmirV/followers","following_url":"https://api.github.com/users/TomerAmirV/following{/other_user}","gists_url":"https://api.github.com/users/TomerAmirV/gists{/gist_id}","starred_url":"https://api.github.com/users/TomerAmirV/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TomerAmirV/subscriptions","organizations_url":"https://api.github.com/users/TomerAmirV/orgs","repos_url":"https://api.github.com/users/TomerAmirV/repos","events_url":"https://api.github.com/users/TomerAmirV/events{/privacy}","received_events_url":"https://api.github.com/users/TomerAmirV/received_events","type":"User","site_admin":false},"labels":[{"id":861690641,"node_id":"MDU6TGFiZWw4NjE2OTA2NDE=","url":"https://api.github.com/repos/Romakita/ts-express-decorators/labels/In%20progress","name":"In progress","color":"56eab6","default":false},{"id":329676967,"node_id":"MDU6TGFiZWwzMjk2NzY5Njc=","url":"https://api.github.com/repos/Romakita/ts-express-decorators/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-06-10T16:25:19Z","updated_at":"2018-06-11T08:11:54Z","closed_at":null,"author_association":"NONE","body":"## Informations\r\n\r\nType | Version\r\n---|---\r\nQuestion | 4.x\r\n\r\n****\r\n\r\n## Description\r\nI am trying to create a multipart endpoint (file upload).\r\nI used the example in the docs and it seems to work fine, but I can't make the swagger doc show the file field of the request. I am also using a path param.\r\n\r\nHere is an example\r\n\r\n```typescript\r\nimport { Controller, PathParams, Post } from '@tsed/common';\r\nimport { MultipartFile } from '@tsed/multipartfiles';\r\n\r\ntype MulterFile = Express.Multer.File;\r\n\r\n@Controller('/api')\r\nexport default class FileCtrl {\r\n\r\n\t@Post('/:username')\r\n\ttest(@MultipartFile() myFile: MulterFile, @Required() @PathParams('username') username: string) {\r\n\t\t// Logic ...\r\n\t}\r\n}\r\n```\r\nswagger result:\r\n```yaml\r\npaths:\r\n  '/api/{username}':\r\n    post:\r\n      parameters:\r\n        - in: path\r\n          name: username\r\n          type: string\r\n          required: true\r\n      consumes: []\r\n```\r\n\r\nExpected Result:\r\n```yaml\r\npaths:\r\n  '/api/{username}':\r\n    post:\r\n      consumes:\r\n         - multipart/form-data\r\n      parameters:\r\n        - in: path\r\n          name: username\r\n          type: string\r\n          required: true\r\n        - in: formData\r\n          name: myFile\r\n          type: file\r\n          description: The file to upload.\r\n      responses:\r\n        '200':\r\n          description: Success\r\n```\r\n\r\nAm I doing something wrong? or is this missing functionality?\r\n\r\nThanks!\r\n\r\n## Acceptance criterias\r\n\r\n- [ ] Example (log, usecase, etc...)\r\n- [ ] Ts.ED version (bug/question)"},"comment":{"url":"https://api.github.com/repos/Romakita/ts-express-decorators/issues/comments/396159214","html_url":"https://github.com/Romakita/ts-express-decorators/issues/389#issuecomment-396159214","issue_url":"https://api.github.com/repos/Romakita/ts-express-decorators/issues/389","id":396159214,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NjE1OTIxNA==","user":{"login":"Romakita","id":1763311,"node_id":"MDQ6VXNlcjE3NjMzMTE=","avatar_url":"https://avatars3.githubusercontent.com/u/1763311?v=4","gravatar_id":"","url":"https://api.github.com/users/Romakita","html_url":"https://github.com/Romakita","followers_url":"https://api.github.com/users/Romakita/followers","following_url":"https://api.github.com/users/Romakita/following{/other_user}","gists_url":"https://api.github.com/users/Romakita/gists{/gist_id}","starred_url":"https://api.github.com/users/Romakita/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Romakita/subscriptions","organizations_url":"https://api.github.com/users/Romakita/orgs","repos_url":"https://api.github.com/users/Romakita/repos","events_url":"https://api.github.com/users/Romakita/events{/privacy}","received_events_url":"https://api.github.com/users/Romakita/received_events","type":"User","site_admin":false},"created_at":"2018-06-11T08:11:54Z","updated_at":"2018-06-11T08:11:54Z","author_association":"OWNER","body":"Work in progress :)"}}
{"actor":{"display_login":"Romakita"}}