RicoSuter / NSwag

The Swagger/OpenAPI toolchain for .NET, ASP.NET Core and TypeScript.
http://NSwag.org
MIT License
6.77k stars 1.29k forks source link

The path is not of a legal form. #109

Closed dmikov closed 8 years ago

dmikov commented 8 years ago

I am trying to use WebApiToSwaggerGenerator. But it gives me IO.Path errors. Why is it trying IO access when I am using WebApiTo not WebApiAssembly? Here is a full code.

namespace API.Controllers
{
    public class SwaggerController : Controller
    {
        private readonly List<Type> _types;

        public SwaggerController()
        {
            _types = new List<Type>
            {
                typeof(ApplicationController),
                typeof(AssetController)
            };
        }

        [HttpGet,Route("swagger")]
        public HttpResponseMessage Swagger()
        {
            var settings = new WebApiToSwaggerGeneratorSettings{DefaultUrlTemplate = "api/{controller}/{action}/{id}"};
            var generator = new WebApiToSwaggerGenerator(settings);
            var service = generator.GenerateForControllers(_types, "Swagger");
            return new HttpResponseMessage
            {
                Content = new StringContent(service.ToJson(), Encoding.UTF8)
            };
        }
    }
}

And here is reply

f4c  An unhandled exception occurred while processing the request. ArgumentException: The path is not of a legal form. System.IO.Path.NormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths)

TargetInvocationException: Exception has been thrown by the target of an invocation. System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)

ff8 Stack Query Cookies Headers ArgumentException: The path is not of a legal form. System.IO.Path.NormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths) System.IO.Path.GetDirectoryName(String path)

Show raw exception details System.ArgumentException: The path is not of a legal form. at System.IO.Path.NormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths) at System.IO.Path.GetDirectoryName(String path) TargetInvocationException: Exception has been thrown by the target of an invocation. System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) NJsonSchema.Infrastructure.FullDotNetMethods.PathGetDirectoryName(String filePath) System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1) NJsonSchema.Infrastructure.XmlDocumentationExtensions.GetXmlDocumentationPath(Object assembly) NJsonSchema.Infrastructure.XmlDocumentationExtensions.GetXmlDocumentation(ParameterInfo parameter) ff8 NSwag.CodeGeneration.SwaggerGenerators.WebApi.WebApiToSwaggerGenerator.LoadReturnType(SwaggerService service, SwaggerOperation operation, MethodInfo method, ISchemaResolver schemaResolver) NSwag.CodeGeneration.SwaggerGenerators.WebApi.WebApiToSwaggerGenerator.GenerateForController(SwaggerService service, Type controllerType, String excludedMethodName, SchemaResolver schemaResolver) NSwag.CodeGeneration.SwaggerGenerators.WebApi.WebApiToSwaggerGenerator.GenerateForControllers(IEnumerable`1 controllerTypes, String excludedMethodName) API.Controllers.SwaggerController.Swagger() in Swagger.cs [HttpGet,Route("swagger")] public HttpResponseMessage Swagger() { //var settings = new WebApiToSwaggerGeneratorSettings{DefaultUrlTemplate = "api/{controller}/{action}/{id}"}; //var generator = new WebApiToSwaggerGenerator(settings); var generator = new WebApiToSwaggerGenerator(new WebApiToSwaggerGeneratorSettings()); var service = generator.GenerateForControllers(_types, "Swagger"); return new HttpResponseMessage { Content = new StringContent(service.ToJson(), Encoding.UTF8) }; } } --- End of stack trace from previous location where exception was thrown --- System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() Microsoft.AspNet.Mvc.Controllers.ControllerAction 675 Executor.ExecuteAsync(MethodInfo actionMethodInfo, Object instance, Object[] orderedActionArguments) Microsoft.AspNet.Mvc.Controllers.ControllerActionInvoker.d6.MoveNext() --- End of stack trace from previous location where exception was thrown --- System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) Microsoft.AspNet.Mvc.Controllers.FilterActionInvoker.d53.MoveNext() --- End of stack trace from previous location ff8 where exception was thrown --- Microsoft.AspNet.Mvc.Controllers.FilterActionInvoker.d44.MoveNext() --- End of stack trace from previous location where exception was thrown --- System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) Microsoft.AspNet.Mvc.Infrastructure.MvcRouteHandler.d6.MoveNext() --- End of stack trace from previous location where exception was thrown --- System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) Microsoft.AspNet.Mvc.Routing.InnerAttributeRoute.d10.MoveNext() --- End of stack trace from previous location where exception was thrown --- System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) Microsoft.AspNet.Routing.RouteCollection.d9.MoveNext() --- End of stack trace from previous location where exception was thrown --- System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) S ff8 ystem.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) Microsoft.AspNet.Builder.RouterMiddleware.d4.MoveNext() --- End of stack trace from previous location where exception was thrown --- System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) System.Runtime.CompilerServices.TaskAwaiter.GetResult() API.Middleware.RequestResponseLogger.d3.MoveNext() in RequestResponseLogger.cs _logger = loggerFactory.CreateLogger(); }

public async Task Invoke(HttpContext context) { LogRequest(context); await _next.Invoke(context); LogResponse(context); }

private async void LogRequest(HttpContext context) { var requestLogString = "{Method:l} {Path:l}"; --- End of stack trace from previous location where exception was thrown --- System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) ff8 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) System.Runtime.CompilerServices.TaskAwaiter.GetResult() API.Middleware.RewindableStream.d__2.MoveNext() in RewindableStream.cs public async Task Invoke(HttpContext context) { var requestStream = context.Request.Body;

if (requestStream == Stream.Null || requestStream.CanSeek) { await _next(context); return; }

try { using (var buffer = new MemoryStream()) --- End of stack trace from previous location where exception was thrown --- System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) Microsoft.AspNet.Builder.Extensions.MapMiddleware.d3.MoveNext() --- End of stack trace from previous location where exception was thrown --- ff8 System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) Microsoft.Owin.Mapping.MapMiddleware.d0.MoveNext() --- End of stack trace from previous location where exception was thrown --- System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) Microsoft.AspNet.Owin.WebSocketAcceptAdapter.<>cDisplayClass6_0.<b0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) Microsoft.AspNet.Cors.Infrastructure.CorsMiddleware.d7.MoveNext() --- End of stack trace from previous location where exception was thrown --- System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) Microsoft.AspNet.Authentication.AuthenticationMiddleware1.<Invoke>d__18.MoveNext() --- End of stack trace from previous location where exception was thrown --- ff8 Microsoft.AspNet.Authentication.AuthenticationMiddleware1.d18.MoveNext() --- End of stack trace from previous location where exception was thrown --- System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) System.Runtime.CompilerServices.TaskAwaiter.GetResult() API.Startup.<>cDisplayClass6_0.<b1>d.MoveNext() in Startup.cs await next(context); } catch(Exception e) { if (context.Response.HasStarted || e.Source!= "System.IdentityModel.Tokens.Jwt") throw; context.Response.StatusCode = 401; } }); var keyProvider = GlobalValues.Container.GetInstance(); app.UseJwtBearerAuthentication(options => { options.AutomaticAuthenticate = true; --- End of stack trace from previous location where exception was thrown --- System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)< ff8 /h3> System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) Microsoft.AspNet.Authentication.AuthenticationMiddleware1.<Invoke>d__18.MoveNext() --- End of stack trace from previous location where exception was thrown --- Microsoft.AspNet.Authentication.AuthenticationMiddleware1.d18.MoveNext() --- End of stack trace from previous location where exception was thrown --- System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) Microsoft.AspNet.Authentication.AuthenticationMiddleware`1.d18.MoveNext() --- End of stack trace from previous location where exception was thrown --- Microsoft.AspNet.Authentication.AuthenticationMiddleware1.<Invoke>d__18.MoveNext() --- End of stack trace from previous location where exception was thrown --- System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) Microsoft.AspNet.Authentication.AuthenticationMiddleware1.d18.MoveNext() --- End of stack trace from previous location where exception was thrown --- ff8 Microsoft.AspNet.Authentication.AuthenticationMiddleware`1.d18.MoveNext() --- End of stack trace from previous location where exception was thrown --- System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) Microsoft.AspNet.Authentication.AuthenticationMiddleware1.<Invoke>d__18.MoveNext() --- End of stack trace from previous location where exception was thrown --- Microsoft.AspNet.Authentication.AuthenticationMiddleware1.d18.MoveNext() --- End of stack trace from previous location where exception was thrown --- System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) Microsoft.AspNet.Builder.Extensions.MapMiddleware.d3.MoveNext() --- End of stack trace from previous location where exception was thrown --- System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) Microsoft.AspNet.IISPlatformHandler.IISPlatformHandlerMiddleware.d8.MoveNext() --- End of stack trace from previous location where exception was thrown --- ff8 System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) Microsoft.AspNet.Diagnostics.DeveloperExceptionPageMiddleware.d7.MoveNext()

Show raw exception details System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ArgumentException: The path is not of a legal form. at System.IO.Path.NormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths) at System.IO.Path.GetDirectoryName(String path) --- End of inner exception stack trace --- at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at NJsonSchema.Infrastructure.FullDotNetMethods.PathGetDirectoryName(String filePath) at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1) at NJsonSchema.Infrastructure.XmlDocumentationExtensions.GetXmlDocumentationPath(Object assembly) at NJsonSchema.Infrastructure.XmlDocumentationExtensions.GetXmlDocumentation(ParameterInfo parameter) at NSwag.CodeGeneration.SwaggerGenerators.WebApi.WebApiToSwaggerGenerator.LoadReturnType(SwaggerService service, SwaggerOperation operation, MethodInfo method, ISchemaResolver schemaResolver) at NSwag.CodeGeneration.SwaggerGenerators.WebApi.WebApiToSwaggerGenerator.GenerateForController(SwaggerService service, Type controllerType, String excludedMethodName, SchemaResolver schemaResolver) at NSwag.CodeGeneration.SwaggerGenerators.WebApi.WebApiToSwaggerGenerator.GenerateForControllers(IEnumerable`1 controllerTypes, String excludedMethodName) at API.Controllers.SwaggerController.Swagger() in E:\Sources\xref\API\Controllers\Swagger.cs:line 29 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at Microsoft.AspNet.Mvc.Controllers.ControllerActionExecutor.ExecuteAsync(MethodInfo actionMethodInfo, Object instance, Object[] orderedActionArguments) at Microsoft.AspNet.Mvc.Controllers.ControllerActionInvoker.d6.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNet.Mvc.Controllers.FilterActionInvoker.d53.MoveNext() --- End of stack trace from previous location where exception was thrown --- ff8

at Microsoft.AspNet.Mvc.Controllers.FilterActionInvoker.d44.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNet.Mvc.Infrastructure.MvcRouteHandler.d6.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNet.Mvc.Routing.InnerAttributeRoute.d10.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNet.Routing.RouteCollection.d9.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNet.Builder.RouterMiddleware.d4.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.GetResult() at API.Middleware.RequestResponseLogger.d3.MoveNext() in E:\Sources\xref\API\Middleware\RequestResponseLogger.cs:line 27 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.GetResult() at API.Middleware.RewindableStream.d2.MoveNext() in E:\Sources\xref\API\Middleware\RewindableStream.cs:line 23 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNet.Builder.Extensions.MapMiddleware.d3.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.Owin.Mapping.MapMiddleware.d0.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNet.Owin.WebSocketAcceptAdapter.<>cDisplayClass6_0.<b0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at ff8 Microsoft.AspNet.Cors.Infrastructure.CorsMiddleware.d7.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNet.Authentication.AuthenticationMiddleware1.<Invoke>d__18.MoveNext() --- End of stack trace from previous location where exception was thrown --- at Microsoft.AspNet.Authentication.AuthenticationMiddleware1.d18.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.GetResult() at API.Startup.<>cDisplayClass6_0.<b1>d.MoveNext() in E:\Sources\xref\API\Startup.cs:line 135 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNet.Authentication.AuthenticationMiddleware`1.d18.MoveNext() --- End of stack trace from previous location where exception was thrown --- at Microsoft.AspNet.Authentication.AuthenticationMiddleware1.<Invoke>d__18.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNet.Authentication.AuthenticationMiddleware1.d18.MoveNext() --- End of stack trace from previous location where exception was thrown --- at Microsoft.AspNet.Authentication.AuthenticationMiddleware`1.d18.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNet.Authentication.AuthenticationMiddleware1.<Invoke>d__18.MoveNext() --- End of stack trace from previous location where exception was thrown --- at Microsoft.AspNet.Authentication.AuthenticationMiddleware1.d18.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNet.Authentication.AuthenticationMiddleware`1.d18.MoveNext() --- End of stack trace from previous location where exception was thrown --- at Microsoft.AspNet.Authentication.AuthenticationMiddleware`1.d18.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNet.Builder.Extensions.MapMiddleware.d3.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.Tas ff8 kAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNet.IISPlatformHandler.IISPlatformHandlerMiddleware.d8.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNet.Diagnostics.DeveloperExceptionPageMiddleware.d7.MoveNext() No QueryString data.

No cookie data.

Variable Value Accept application/json, text/plain, / Accept-Encoding gzip, deflate, sdch Accept-Language en-US,en;q=0.8,ru;q=0.6 Authorization Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYmYiOjE0NjM0ODkxMjIsImV4cCI6MTQ2MzUwMzUyMiwiaWF0IjoxNDYzNDg5MTIyLCJuYW1laWQiOiJfNHduR3dYclA2Q3BGIiwidW5pcXVlX25hbWUiOiJhZG1pbiIsImlzcyI6IlN3aW1sYW5lIiwiYXVkIjoiU3dpbWxhbmUifQ.DTpjQNSB2K--JKVL0UtXOxPpG21DDO9SsGygAG2dQBkJ4FVjVk8uk8UiOFP-oIyAHiMgvuzqJTqwwcMwZvxMGj0JnMCanJV2ocd2385pAkJeS1UTKszFO0adRoWJQvz_zpM7ZTdfWzvAkoFQxW2qO8RgnagwIKCLjm6OqrbowtNOtY3zGe6X4a5OxggXKpw7w4UXdmlnWBwFbHCJsmAqhuTnIct2RQL-39g5yi-pEGnxjAc71wIkplgVmYk58LDkJ3B6_12EjWdw1kzM6S_OuqZHUO8mthzNeTzRr72Uub9nLLYk593mXEedayxrGV-PtNx4th9ZpExmNCi0qW6ijQ Connection upgrade DNT 1 Host localhost Referer http://localhost:8080/welcome Timezone 240 User-Agent Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.87 Safari/537.36

0

RicoSuter commented 8 years ago

Fixed in https://github.com/NJsonSchema/NJsonSchema/commit/1b2525da3e2be4a54703267acb59643195107e43

RicoSuter commented 8 years ago

Soon available in NSwag v2.23

AgentFire commented 6 years ago

Not so fixed after all.

image

RicoSuter commented 6 years ago

Can you create a new issue?

AgentFire commented 6 years ago

Not sure yet, it seems to be the issue when I'm using the NSwag directly. But I'm using self-hosted webapi2 framework. With Swashbuckle instead of NSwag it works better, at least doesn't throw.

RicoSuter commented 6 years ago

Can you post a stacktrace?

AgentFire commented 6 years ago

Sure can do.