{"action":"created","issue":{"url":"https://api.github.com/repos/swagger-api/swagger-codegen/issues/3695","repository_url":"https://api.github.com/repos/swagger-api/swagger-codegen","labels_url":"https://api.github.com/repos/swagger-api/swagger-codegen/issues/3695/labels{/name}","comments_url":"https://api.github.com/repos/swagger-api/swagger-codegen/issues/3695/comments","events_url":"https://api.github.com/repos/swagger-api/swagger-codegen/issues/3695/events","html_url":"https://github.com/swagger-api/swagger-codegen/issues/3695","id":174511383,"number":3695,"title":"TypeScript Angular2 wrong Map usage","user":{"login":"ataraxus","id":1838191,"avatar_url":"https://avatars.githubusercontent.com/u/1838191?v=3","gravatar_id":"","url":"https://api.github.com/users/ataraxus","html_url":"https://github.com/ataraxus","followers_url":"https://api.github.com/users/ataraxus/followers","following_url":"https://api.github.com/users/ataraxus/following{/other_user}","gists_url":"https://api.github.com/users/ataraxus/gists{/gist_id}","starred_url":"https://api.github.com/users/ataraxus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ataraxus/subscriptions","organizations_url":"https://api.github.com/users/ataraxus/orgs","repos_url":"https://api.github.com/users/ataraxus/repos","events_url":"https://api.github.com/users/ataraxus/events{/privacy}","received_events_url":"https://api.github.com/users/ataraxus/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/swagger-api/swagger-codegen/labels/Client:%20TypeScript","name":"Client: TypeScript","color":"fad8c7"},{"url":"https://api.github.com/repos/swagger-api/swagger-codegen/labels/Issue:%20Bug","name":"Issue: Bug","color":"e11d21"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/swagger-api/swagger-codegen/milestones/13","html_url":"https://github.com/swagger-api/swagger-codegen/milestones/v2.2.2","labels_url":"https://api.github.com/repos/swagger-api/swagger-codegen/milestones/13/labels","id":1928763,"number":13,"title":"v2.2.2","description":"","creator":{"login":"wing328","id":934260,"avatar_url":"https://avatars.githubusercontent.com/u/934260?v=3","gravatar_id":"","url":"https://api.github.com/users/wing328","html_url":"https://github.com/wing328","followers_url":"https://api.github.com/users/wing328/followers","following_url":"https://api.github.com/users/wing328/following{/other_user}","gists_url":"https://api.github.com/users/wing328/gists{/gist_id}","starred_url":"https://api.github.com/users/wing328/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wing328/subscriptions","organizations_url":"https://api.github.com/users/wing328/orgs","repos_url":"https://api.github.com/users/wing328/repos","events_url":"https://api.github.com/users/wing328/events{/privacy}","received_events_url":"https://api.github.com/users/wing328/received_events","type":"User","site_admin":false},"open_issues":265,"closed_issues":207,"state":"open","created_at":"2016-08-08T09:16:56Z","updated_at":"2016-10-02T08:35:44Z","due_on":null,"closed_at":null},"comments":4,"created_at":"2016-09-01T12:33:33Z","updated_at":"2016-10-02T08:50:17Z","closed_at":null,"body":"##### Description\r\n\r\nHello, I'm using the editor.swagger.io for code generation. I stumbled upon this: If you define formData parameter the api client generates following code: \r\n`formParams['key'] = value;`\r\nwhich leds to an empty request, since later on the request parameters are derived by;\r\n`requestOptions.body = formParams.toString();` \r\nThe 'correct' usage of the TS Map interface would be:\r\n`formParams.set('key', value);`\r\n\r\nI would imagine that this could be a fairly simple fix, I even looked at the **TypeScriptAngular2ClientCodegen.java** but wasn't sure if this could be the [problem](https://github.com/swagger-api/swagger-codegen/blob/master/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/TypeScriptAngular2ClientCodegen.java#L123) \r\n\r\n\r\n##### Swagger-codegen version\r\n\r\neditor.swagger.io\r\n\r\n##### Swagger declaration file content or url\r\n\r\n```yaml\r\nswagger: '2.0'\r\ninfo:\r\n  version: 1.0.0\r\n  title: Broken TS Map generation\r\nhost: broken.map\r\nbasePath: /\r\n\r\npaths:\r\n  /brokenMap:\r\n    post:\r\n      parameters:\r\n        - name: limit\r\n          in: formData\r\n          description: number of User to return\r\n          type: integer\r\n         \r\n      responses:\r\n        200:\r\n          description:  List all User\r\n          schema:\r\n            title: Pets\r\n            type: array\r\n            items:\r\n              $ref: '#/definitions/User'\r\n\r\ndefinitions:\r\n  User:\r\n    type: object\r\n    properties:\r\n       roles:\r\n        type: array\r\n        items:\r\n          type: string\r\n\r\n```\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/swagger-api/swagger-codegen/issues/comments/250960894","html_url":"https://github.com/swagger-api/swagger-codegen/issues/3695#issuecomment-250960894","issue_url":"https://api.github.com/repos/swagger-api/swagger-codegen/issues/3695","id":250960894,"user":{"login":"wing328","id":934260,"avatar_url":"https://avatars.githubusercontent.com/u/934260?v=3","gravatar_id":"","url":"https://api.github.com/users/wing328","html_url":"https://github.com/wing328","followers_url":"https://api.github.com/users/wing328/followers","following_url":"https://api.github.com/users/wing328/following{/other_user}","gists_url":"https://api.github.com/users/wing328/gists{/gist_id}","starred_url":"https://api.github.com/users/wing328/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wing328/subscriptions","organizations_url":"https://api.github.com/users/wing328/orgs","repos_url":"https://api.github.com/users/wing328/repos","events_url":"https://api.github.com/users/wing328/events{/privacy}","received_events_url":"https://api.github.com/users/wing328/received_events","type":"User","site_admin":false},"created_at":"2016-10-02T08:50:17Z","updated_at":"2016-10-02T08:50:17Z","body":"@ataraxus usually it takes 3 to 4 months for a minor release."}}
{"actor":{"display_login":"wing328"}}