{"action":"created","issue":{"url":"https://api.github.com/repos/OpenAPITools/openapi-generator/issues/1274","repository_url":"https://api.github.com/repos/OpenAPITools/openapi-generator","labels_url":"https://api.github.com/repos/OpenAPITools/openapi-generator/issues/1274/labels{/name}","comments_url":"https://api.github.com/repos/OpenAPITools/openapi-generator/issues/1274/comments","events_url":"https://api.github.com/repos/OpenAPITools/openapi-generator/issues/1274/events","html_url":"https://github.com/OpenAPITools/openapi-generator/pull/1274","id":371959571,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI0Mjg4NzE0","number":1274,"title":"[TypeScript] typescript-axios: Added possibility to add custom axios instance.","user":{"login":"sruehl","id":1769155,"node_id":"MDQ6VXNlcjE3NjkxNTU=","avatar_url":"https://avatars0.githubusercontent.com/u/1769155?v=4","gravatar_id":"","url":"https://api.github.com/users/sruehl","html_url":"https://github.com/sruehl","followers_url":"https://api.github.com/users/sruehl/followers","following_url":"https://api.github.com/users/sruehl/following{/other_user}","gists_url":"https://api.github.com/users/sruehl/gists{/gist_id}","starred_url":"https://api.github.com/users/sruehl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sruehl/subscriptions","organizations_url":"https://api.github.com/users/sruehl/orgs","repos_url":"https://api.github.com/users/sruehl/repos","events_url":"https://api.github.com/users/sruehl/events{/privacy}","received_events_url":"https://api.github.com/users/sruehl/received_events","type":"User","site_admin":false},"labels":[{"id":931403150,"node_id":"MDU6TGFiZWw5MzE0MDMxNTA=","url":"https://api.github.com/repos/OpenAPITools/openapi-generator/labels/Client:%20TypeScript","name":"Client: TypeScript","color":"fad8c7","default":false},{"id":931403198,"node_id":"MDU6TGFiZWw5MzE0MDMxOTg=","url":"https://api.github.com/repos/OpenAPITools/openapi-generator/labels/Enhancement:%20General","name":"Enhancement: General","color":"e5ffe5","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/OpenAPITools/openapi-generator/milestones/16","html_url":"https://github.com/OpenAPITools/openapi-generator/milestone/16","labels_url":"https://api.github.com/repos/OpenAPITools/openapi-generator/milestones/16/labels","id":3739692,"node_id":"MDk6TWlsZXN0b25lMzczOTY5Mg==","number":16,"title":"3.3.2","description":"","creator":{"login":"wing328","id":934260,"node_id":"MDQ6VXNlcjkzNDI2MA==","avatar_url":"https://avatars2.githubusercontent.com/u/934260?v=4","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":32,"closed_issues":19,"state":"open","created_at":"2018-10-15T13:35:35Z","updated_at":"2018-10-22T06:02:16Z","due_on":"2018-10-29T07:00:00Z","closed_at":null},"comments":6,"created_at":"2018-10-19T13:32:57Z","updated_at":"2018-10-22T09:06:49Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/OpenAPITools/openapi-generator/pulls/1274","html_url":"https://github.com/OpenAPITools/openapi-generator/pull/1274","diff_url":"https://github.com/OpenAPITools/openapi-generator/pull/1274.diff","patch_url":"https://github.com/OpenAPITools/openapi-generator/pull/1274.patch"},"body":"This comes in handy if you want to use mocks in tests.\r\n\r\n### PR checklist\r\n\r\n- [x] Read the [contribution guidelines](https://github.com/openapitools/openapi-generator/blob/master/CONTRIBUTING.md).\r\n- [x] Ran the shell script under `./bin/` to update Petstore sample so that CIs can verify the change. (For instance, only need to run `./bin/{LANG}-petstore.sh` and `./bin/security/{LANG}-petstore.sh` if updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates). Windows batch files can be found in `.\\bin\\windows\\`.\r\n- [x] Filed the PR against the [correct branch](https://github.com/OpenAPITools/openapi-generator/wiki/Git-Branches): `master`, `3.4.x`, `4.0.x`. Default: `master`.\r\n- [x] Copied the [technical committee](https://github.com/openapitools/openapi-generator/#62---openapi-generator-technical-committee) to review the pull request if your PR is targeting a particular programming language.\r\n\r\n### Description of the PR\r\n\r\nThis PR adds the possibility to supply a custom axios instance to the typescript-axios clients.\r\nThis then can be used to supply a axios mock adapter in unit-tests: `const mock = new MockAdapter(axiosInstance, { delayResponse: 600 })`.\r\nTo test this feature a simple test-case has been added which just supplies the global axios instance.\r\n\r\n*Updated remark (2018/10/22):* One thing we could do different is to supply the instance via configuration or constructor parameter so one doesn't need to supply the instance on every call.\r\n\r\ncc: @TiFu (2017/07) @taxpon (2017/07) @sebastianhaas (2017/07) @kenisteward (2017/07) @Vrolijkx (2017/09) @macjohnny (2018/01) @nicokoenig (2018/09)"},"comment":{"url":"https://api.github.com/repos/OpenAPITools/openapi-generator/issues/comments/431779935","html_url":"https://github.com/OpenAPITools/openapi-generator/pull/1274#issuecomment-431779935","issue_url":"https://api.github.com/repos/OpenAPITools/openapi-generator/issues/1274","id":431779935,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMTc3OTkzNQ==","user":{"login":"nicokoenig","id":16404104,"node_id":"MDQ6VXNlcjE2NDA0MTA0","avatar_url":"https://avatars0.githubusercontent.com/u/16404104?v=4","gravatar_id":"","url":"https://api.github.com/users/nicokoenig","html_url":"https://github.com/nicokoenig","followers_url":"https://api.github.com/users/nicokoenig/followers","following_url":"https://api.github.com/users/nicokoenig/following{/other_user}","gists_url":"https://api.github.com/users/nicokoenig/gists{/gist_id}","starred_url":"https://api.github.com/users/nicokoenig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicokoenig/subscriptions","organizations_url":"https://api.github.com/users/nicokoenig/orgs","repos_url":"https://api.github.com/users/nicokoenig/repos","events_url":"https://api.github.com/users/nicokoenig/events{/privacy}","received_events_url":"https://api.github.com/users/nicokoenig/received_events","type":"User","site_admin":false},"created_at":"2018-10-22T09:06:49Z","updated_at":"2018-10-22T09:06:49Z","author_association":"CONTRIBUTOR","body":"@sruehl @wing328 Looks good to me! 🔥 "}}
{"actor":{"display_login":"nicokoenig"}}