{"action":"opened","issue":{"url":"https://api.github.com/repos/rbeauchamp/Swashbuckle.OData/issues/40","labels_url":"https://api.github.com/repos/rbeauchamp/Swashbuckle.OData/issues/40/labels{/name}","comments_url":"https://api.github.com/repos/rbeauchamp/Swashbuckle.OData/issues/40/comments","events_url":"https://api.github.com/repos/rbeauchamp/Swashbuckle.OData/issues/40/events","html_url":"https://github.com/rbeauchamp/Swashbuckle.OData/issues/40","id":124303431,"number":40,"title":"Parameter Constructor expected or exception is thrown","user":{"login":"darewreck54","id":16171726,"avatar_url":"https://avatars.githubusercontent.com/u/16171726?v=3","gravatar_id":"","url":"https://api.github.com/users/darewreck54","html_url":"https://github.com/darewreck54","followers_url":"https://api.github.com/users/darewreck54/followers","following_url":"https://api.github.com/users/darewreck54/following{/other_user}","gists_url":"https://api.github.com/users/darewreck54/gists{/gist_id}","starred_url":"https://api.github.com/users/darewreck54/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/darewreck54/subscriptions","organizations_url":"https://api.github.com/users/darewreck54/orgs","repos_url":"https://api.github.com/users/darewreck54/repos","events_url":"https://api.github.com/users/darewreck54/events{/privacy}","received_events_url":"https://api.github.com/users/darewreck54/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-12-30T04:44:40Z","updated_at":"2015-12-30T04:44:40Z","closed_at":null,"body":"It seems that with one of my controller, it requires that you have a parameter less Constructor.  If one isn't present, an exception will be thrown when you try to load the swagger UI.  Is this a specific requirement for using swashbuckle Odata?\r\n\r\n500 : {\r\n \"Message\": \"An error has occurred.\",\r\n \"ExceptionMessage\": \"An error occurred when trying to create a controller of type 'ProductsController'. Make sure that the controller has a parameterless public constructor.\",\r\n \"ExceptionType\": \"System.InvalidOperationException\",\r\n \"StackTrace\": \" at System.Web.Http.Dispatcher.DefaultHttpControllerActivator.Create(HttpRequestMessage request, HttpControllerDescriptor controllerDescriptor, Type controllerType)\\r\\n at System.Web.Http.Controllers.HttpControllerDescriptor.CreateController(HttpRequestMessage request)\\r\\n at Swashbuckle.OData.Descriptions.HttpRequestMessageExtensions.GetHttpActionDescriptor(HttpRequestMessage request)\\r\\n at Swashbuckle.OData.Descriptions.SwaggerRouteStrategy.GetActionDescriptors(HttpMethod httpMethod, Operation potentialOperation, String potentialPathTemplate, ODataRoute oDataRoute, HttpConfiguration httpConfig)\\r\\n at Swashbuckle.OData.Descriptions.SwaggerRouteStrategy.GetActionDescriptors(SwaggerRoute potentialSwaggerRoute, HttpConfiguration httpConfig)\\r\\n at Swashbuckle.OData.Descriptions.SwaggerRouteStrategy.<>c__DisplayClass3_0.<Generate>b__1(SwaggerRoute potentialSwaggerRoute)\\r\\n at System.Linq.Enumerable.<SelectManyIterator>d__1`2.MoveNext()\\r\\n at System.Linq.Enumerable.<SelectManyIterator>d__1`2.MoveNext()\\r\\n at System.Linq.Enumerable.<SelectManyIterator>d__1`2.MoveNext()\\r\\n at System.Linq.Enumerable.<DistinctIterator>d__1`1.MoveNext()\\r\\n at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)\\r\\n at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)\\r\\n at Swashbuckle.OData.CollectionExtentions.ToCollection[T](IEnumerable`1 source)\\r\\n at Swashbuckle.OData.Descriptions.ODataApiExplorer.GetApiDescriptions()\\r\\n at System.Lazy`1.CreateValue()\\r\\n at System.Lazy`1.LazyInitValue()\\r\\n at System.Lazy`1.get_Value()\\r\\n at Swashbuckle.OData.Descriptions.ODataApiExplorer.get_ApiDescriptions()\\r\\n at Swashbuckle.OData.ODataSwaggerProvider.GetApiDescriptionsFor(String apiVersion)\\r\\n at Swashbuckle.OData.ODataSwaggerProvider.GetSwagger(String rootUrl, String apiVersion)\\r\\n at Swashbuckle.Application.SwaggerDocsHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)\\r\\n at System.Net.Http.HttpMessageInvoker.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)\\r\\n at System.Web.Http.Dispatcher.HttpRoutingDispatcher.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)\\r\\n at System.Net.Http.DelegatingHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)\\r\\n at System.Web.Http.Cors.CorsMessageHandler.<>n__FabricatedMethod3(HttpRequestMessage , CancellationToken )\\r\\n at System.Web.Http.Cors.CorsMessageHandler.<SendAsync>d__0.MoveNext()\\r\\n--- End of stack trace from previous location where exception was thrown ---\\r\\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\\r\\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\\r\\n at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()\\r\\n at System.Web.Http.HttpServer.<SendAsync>d__0.MoveNext()\",\r\n \"InnerException\": {\r\n \"Message\": \"An error has occurred.\",\r\n \"ExceptionMessage\": \"Type ProductsController' does not have a default constructor\",\r\n \"ExceptionType\": \"System.ArgumentException\",\r\n \"StackTrace\": \" at System.Linq.Expressions.Expression.New(Type type)\\r\\n at System.Web.Http.Internal.TypeActivator.Create[TBase](Type instanceType)\\r\\n at System.Web.Http.Dispatcher.DefaultHttpControllerActivator.GetInstanceOrActivator(HttpRequestMessage request, Type controllerType, Func`1& activator)\\r\\n at System.Web.Http.Dispatcher.DefaultHttpControllerActivator.Create(HttpRequestMessage request, HttpControllerDescriptor controllerDescriptor, Type controllerType)\"\r\n }\r\n } http://localhost:4448/swagger/docs/v1\r\n\r\nThanks,\r\nD"}}