protected override Task <HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
        {
            var setting = Its.Configuration.Settings.Get <SwaggerToolSettings>();
            //using refletions to internal
            var swaggerProvider = (ISwaggerProvider)_config.GetType().GetMethod("GetSwaggerProvider", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic).Invoke(_config, new object[] { request });

            var rootUrl = (string)_config.GetType().GetMethod("GetRootUrl", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic).Invoke(_config, new object[] { request });

            //var type = request.GetRouteData().Values["type"].ToString();

            try
            {
                var swaggerDoc = swaggerProvider.GetSwagger(rootUrl, setting.version);
                var str        = JsonConvert.SerializeObject(swaggerDoc, Formatting.Indented, new JsonSerializerSettings()
                {
                    NullValueHandling = NullValueHandling.Ignore, Converters = new[] { new VendorExtensionsConverter() }
                });
                var service = NSwag.SwaggerDocument.FromJson(str);

                var code = new PostManGen().Gen(service, rootUrl, setting);
                var req  = new HttpResponseMessage {
                    Content = new StringContent(code)
                };
                req.Content.Headers.Add("Content-Disposition", "attachment;filename=swagger2postman.json");
                return(TaskFor(req));
            }
            catch (UnknownApiVersion ex)
            {
                return(TaskFor(request.CreateErrorResponse(HttpStatusCode.NotFound, ex)));
            }
        }
        protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
        {
            var setting = Its.Configuration.Settings.Get<SwaggerToolSettings>();
            //using refletions to internal
            var swaggerProvider = (ISwaggerProvider)_config.GetType().GetMethod("GetSwaggerProvider", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic).Invoke(_config, new object[] { request });

            var rootUrl = (string)_config.GetType().GetMethod("GetRootUrl", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic).Invoke(_config, new object[] { request });
            //var type = request.GetRouteData().Values["type"].ToString();

            try
            {
                var swaggerDoc = swaggerProvider.GetSwagger(rootUrl, setting.version);
                var str = JsonConvert.SerializeObject(swaggerDoc, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore, Converters = new[] { new VendorExtensionsConverter() } });
                var service = NSwag.SwaggerDocument.FromJson(str);

                var code = new PostManGen().Gen( service, rootUrl, setting);
                var req = new HttpResponseMessage { Content = new StringContent(code) };
                req.Content.Headers.Add("Content-Disposition", "attachment;filename=swagger2postman.json");
                return TaskFor(req);
            }
            catch (UnknownApiVersion ex)
            {
                return TaskFor(request.CreateErrorResponse(HttpStatusCode.NotFound, ex));
            }
        }