{"action":"created","issue":{"url":"https://api.github.com/repos/RSuter/NSwag/issues/970","repository_url":"https://api.github.com/repos/RSuter/NSwag","labels_url":"https://api.github.com/repos/RSuter/NSwag/issues/970/labels{/name}","comments_url":"https://api.github.com/repos/RSuter/NSwag/issues/970/comments","events_url":"https://api.github.com/repos/RSuter/NSwag/issues/970/events","html_url":"https://github.com/RSuter/NSwag/issues/970","id":261555809,"number":970,"title":"Multiple import moment in type script output","user":{"login":"Rgl88","id":10597668,"avatar_url":"https://avatars3.githubusercontent.com/u/10597668?v=4","gravatar_id":"","url":"https://api.github.com/users/Rgl88","html_url":"https://github.com/Rgl88","followers_url":"https://api.github.com/users/Rgl88/followers","following_url":"https://api.github.com/users/Rgl88/following{/other_user}","gists_url":"https://api.github.com/users/Rgl88/gists{/gist_id}","starred_url":"https://api.github.com/users/Rgl88/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rgl88/subscriptions","organizations_url":"https://api.github.com/users/Rgl88/orgs","repos_url":"https://api.github.com/users/Rgl88/repos","events_url":"https://api.github.com/users/Rgl88/events{/privacy}","received_events_url":"https://api.github.com/users/Rgl88/received_events","type":"User","site_admin":false},"labels":[{"id":374604058,"url":"https://api.github.com/repos/RSuter/NSwag/labels/done","name":"done","color":"0052cc","default":false},{"id":255705723,"url":"https://api.github.com/repos/RSuter/NSwag/labels/question","name":"question","color":"eb6420","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-09-29T07:36:10Z","updated_at":"2017-09-29T10:00:18Z","closed_at":null,"author_association":"NONE","body":"hello\r\ngenerated type script code from angular has error:\r\nmoment imported two times and one rxjs operator not imported!. do special configuration is required and it not related to NSwag?\r\nWhen i activate or set path for output in swaggerToCSharpClient section, if i set true for generateContractsOutput, Contract file generated in batch file(run Nswag) folder, but main file created in correct path (i set in output).\r\n```\r\n/* tslint:disable */\r\n//----------------------\r\n// <auto-generated>\r\n//     Generated using the NSwag toolchain v11.8.3.0 (NJsonSchema v9.6.5.0 (Newtonsoft.Json v9.0.0.0)) (http://NSwag.org)\r\n// </auto-generated>\r\n//----------------------\r\n// ReSharper disable InconsistentNaming\r\n\r\nimport * as moment from 'moment';        <====\r\n\r\nimport 'rxjs/add/observable/fromPromise';\r\nimport 'rxjs/add/observable/of';\r\nimport 'rxjs/add/observable/throw';\r\nimport 'rxjs/add/operator/map';\r\nimport 'rxjs/add/operator/toPromise';\r\nimport 'rxjs/add/operator/mergeMap';\r\nimport 'rxjs/add/operator/catch';\r\nimport ''rxjs/add/operator/finally';      <====   Not imported! (Do special configuration is required?)\r\n\r\nimport { Observable } from 'rxjs/Observable';\r\nimport { Injectable, Inject, Optional, OpaqueToken } from '@angular/core';\r\nimport { Http, Headers, ResponseContentType, Response } from '@angular/http';\r\n\r\nimport * as moment from 'moment';           <====\r\n```\r\n\r\nNswag setting:\r\n```\r\n{\r\n  \"swaggerGenerator\": {\r\n    \"fromSwagger\": {\r\n      \"url\": \"http://localhost:21021/swagger/v1/swagger.json\",\r\n      \"output\": null\r\n    }\r\n  },\r\n  \"codeGenerators\": {\r\n    \"swaggerToTypeScriptClient\": {\r\n      \"className\": \"{controller}ServiceProxy\",\r\n      \"moduleName\": \"\",\r\n      \"namespace\": \"\",\r\n      \"typeScriptVersion\": 1.8,\r\n      \"template\": \"Angular\",\r\n      \"promiseType\": \"Promise\",\r\n      \"dateTimeType\": \"MomentJS\",\r\n      \"nullValue\": \"Undefined\",\r\n      \"generateClientClasses\": true,\r\n      \"generateClientInterfaces\": false,\r\n      \"generateOptionalParameters\": false,\r\n      \"wrapDtoExceptions\": false,\r\n      \"wrapResponses\": false,\r\n      \"generateResponseClasses\": true,\r\n      \"responseClass\": \"SwaggerResponse\",\r\n      \"useTransformOptionsMethod\": false,\r\n      \"useTransformResultMethod\": false,\r\n      \"generateDtoTypes\": true,\r\n      \"operationGenerationMode\": \"MultipleClientsFromPathSegments\",\r\n      \"markOptionalProperties\": false,\r\n      \"generateCloneMethod\": false,\r\n      \"typeStyle\": \"Class\",\r\n      \"extensionCode\": \"service.extensions.ts\",\r\n      \"generateDefaultValues\": true,\r\n      \"excludedTypeNames\": [],\r\n      \"handleReferences\": false,\r\n      \"generateConstructorInterface\": true,\r\n      \"importRequiredTypes\": true,\r\n      \"useGetBaseUrlMethod\": false,\r\n      \"baseUrlTokenName\": \"API_BASE_URL\",\r\n      \"output\": \"../src/shared/service-proxies/service-proxies.ts\"\r\n    },\r\n    \"swaggerToCSharpClient\": {\r\n      \"generateClientClasses\": true,\r\n      \"generateClientInterfaces\": true,\r\n      \"generateDtoTypes\": true,\r\n      \"injectHttpClient\": false,\r\n      \"disposeHttpClient\": true,\r\n      \"generateExceptionClasses\": true,\r\n      \"exceptionClass\": \"SwaggerException\",\r\n      \"wrapDtoExceptions\": true,\r\n      \"useHttpClientCreationMethod\": false,\r\n      \"httpClientType\": \"System.Net.Http.HttpClient\",\r\n      \"useHttpRequestMessageCreationMethod\": false,\r\n      \"useBaseUrl\": true,\r\n      \"generateSyncMethods\": false,\r\n      \"clientClassAccessModifier\": \"public\",\r\n      \"generateContractsOutput\": true,\r\n      \"parameterDateTimeFormat\": \"s\",\r\n      \"generateUpdateJsonSerializerSettingsMethod\": true,\r\n      \"serializeTypeInformation\": false,\r\n      \"className\": \"{controller}Client\",\r\n      \"namespace\": \"Services.WebApi\",\r\n      \"generateOptionalParameters\": false,\r\n      \"requiredPropertiesMustBeDefined\": true,\r\n      \"dateType\": \"System.DateTime\",\r\n      \"dateTimeType\": \"System.DateTime\",\r\n      \"timeType\": \"System.TimeSpan\",\r\n      \"timeSpanType\": \"System.TimeSpan\",\r\n      \"arrayType\": \"System.Collections.ObjectModel.ObservableCollection\",\r\n      \"dictionaryType\": \"System.Collections.Generic.Dictionary\",\r\n      \"classStyle\": \"Inpc\",\r\n      \"operationGenerationMode\": \"MultipleClientsFromPathSegments\",\r\n      \"generateDefaultValues\": true,\r\n      \"generateDataAnnotations\": true,\r\n      \"excludedTypeNames\": [],\r\n      \"wrapResponses\": false,\r\n      \"generateResponseClasses\": true,\r\n      \"responseClass\": \"SwaggerResponse\",\r\n      \"handleReferences\": false,\r\n      \"generateImmutableArrayProperties\": false,\r\n      \"generateImmutableDictionaryProperties\": false,\r\n      \"output\": null\r\n    },\r\n    \"swaggerToCSharpController\": {\r\n      \"controllerStyle\": \"Partial\",\r\n      \"useCancellationToken\": false,\r\n      \"className\": \"{controller}\",\r\n      \"namespace\": \"MyNamespace\",\r\n      \"additionalNamespaceUsages\": [\r\n        \"System.Web.Http\"\r\n      ],\r\n      \"generateOptionalParameters\": false,\r\n      \"requiredPropertiesMustBeDefined\": true,\r\n      \"dateType\": \"System.DateTime\",\r\n      \"dateTimeType\": \"System.DateTime\",\r\n      \"timeType\": \"System.TimeSpan\",\r\n      \"timeSpanType\": \"System.TimeSpan\",\r\n      \"arrayType\": \"System.Collections.Generic.IEnumerable\",\r\n      \"dictionaryType\": \"System.Collections.Generic.Dictionary\",\r\n      \"classStyle\": \"Inpc\",\r\n      \"operationGenerationMode\": \"MultipleClientsFromOperationId\",\r\n      \"generateDefaultValues\": true,\r\n      \"generateDataAnnotations\": true,\r\n      \"excludedTypeNames\": [],\r\n      \"wrapResponses\": false,\r\n      \"generateResponseClasses\": true,\r\n      \"responseClass\": \"SwaggerResponse\",\r\n      \"handleReferences\": false,\r\n      \"generateImmutableArrayProperties\": false,\r\n      \"generateImmutableDictionaryProperties\": false,\r\n      \"output\": null\r\n    }\r\n  }\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/RSuter/NSwag/issues/comments/333085909","html_url":"https://github.com/RSuter/NSwag/issues/970#issuecomment-333085909","issue_url":"https://api.github.com/repos/RSuter/NSwag/issues/970","id":333085909,"user":{"login":"Rgl88","id":10597668,"avatar_url":"https://avatars3.githubusercontent.com/u/10597668?v=4","gravatar_id":"","url":"https://api.github.com/users/Rgl88","html_url":"https://github.com/Rgl88","followers_url":"https://api.github.com/users/Rgl88/followers","following_url":"https://api.github.com/users/Rgl88/following{/other_user}","gists_url":"https://api.github.com/users/Rgl88/gists{/gist_id}","starred_url":"https://api.github.com/users/Rgl88/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rgl88/subscriptions","organizations_url":"https://api.github.com/users/Rgl88/orgs","repos_url":"https://api.github.com/users/Rgl88/repos","events_url":"https://api.github.com/users/Rgl88/events{/privacy}","received_events_url":"https://api.github.com/users/Rgl88/received_events","type":"User","site_admin":false},"created_at":"2017-09-29T10:00:18Z","updated_at":"2017-09-29T10:00:18Z","author_association":"NONE","body":"Ok \r\nI add this  [ import ''rxjs/add/operator/finally'; ] to service.extensions.ts too.\r\nthank you"}}
{"actor":{"display_login":"Rgl88"}}