{"action":"created","issue":{"url":"https://api.github.com/repos/rbeauchamp/Swashbuckle.OData/issues/57","repository_url":"https://api.github.com/repos/rbeauchamp/Swashbuckle.OData","labels_url":"https://api.github.com/repos/rbeauchamp/Swashbuckle.OData/issues/57/labels{/name}","comments_url":"https://api.github.com/repos/rbeauchamp/Swashbuckle.OData/issues/57/comments","events_url":"https://api.github.com/repos/rbeauchamp/Swashbuckle.OData/issues/57/events","html_url":"https://github.com/rbeauchamp/Swashbuckle.OData/issues/57","id":127779035,"number":57,"title":"Issue with odata routes that contain route prefixes with parameters","user":{"login":"wbreza","id":6540159,"avatar_url":"https://avatars.githubusercontent.com/u/6540159?v=3","gravatar_id":"","url":"https://api.github.com/users/wbreza","html_url":"https://github.com/wbreza","followers_url":"https://api.github.com/users/wbreza/followers","following_url":"https://api.github.com/users/wbreza/following{/other_user}","gists_url":"https://api.github.com/users/wbreza/gists{/gist_id}","starred_url":"https://api.github.com/users/wbreza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wbreza/subscriptions","organizations_url":"https://api.github.com/users/wbreza/orgs","repos_url":"https://api.github.com/users/wbreza/repos","events_url":"https://api.github.com/users/wbreza/events{/privacy}","received_events_url":"https://api.github.com/users/wbreza/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/rbeauchamp/Swashbuckle.OData/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2016-01-20T20:40:12Z","updated_at":"2016-02-08T04:30:54Z","closed_at":"2016-02-08T04:22:48Z","body":"If a ODataRoute is registered with a route prefix that contains parameters I received the following exception when requesting the swagger route.\r\n\r\nEx) Within a WebApiConfig class or similar\r\n```\r\nconfig.MapODataServiceRoute(\r\n    routeName: \"ODataRoute\",\r\n    routePrefix: \"{version}/{tenant}\",\r\n    model: builder.GetEdmModel()\r\n);\r\n```\r\n\r\n**Exception Message**\r\nThe path variable 'VERSION' in the UriTemplate must be bound to a non-empty string value. Parameter name: parameters\r\n\r\n**Stack Trace**\r\nat System.UriTemplate.VariablesCollection.LoadDefaultsAndValidate(String[] normalizedParameters, Int32& lastNonDefaultPathParameter, Int32& lastNonNullablePathParameter) at System.UriTemplate.VariablesCollection.ProcessDefaultsAndCreateBindInfo(Boolean omitDefaults, String[] normalizedParameters, IDictionary`2 extraParameters, BindInformation& bindInfo) at System.UriTemplate.VariablesCollection.PrepareBindInformation(IDictionary`2 parameters, Boolean omitDefaults) at System.UriTemplate.BindByName(Uri baseAddress, IDictionary`2 parameters, Boolean omitDefaults) at Swashbuckle.OData.Descriptions.OperationExtensions.GenerateSampleODataAbsoluteUri(Operation operation, String serviceRoot, String pathTemplate) at Swashbuckle.OData.Descriptions.SwaggerRouteStrategy.CreateHttpRequestMessage(HttpMethod httpMethod, Operation potentialOperation, String potentialPathTemplate, ODataRoute oDataRoute, HttpConfiguration httpConfig) at Swashbuckle.OData.Descriptions.SwaggerRouteStrategy.GetActionDescriptors(HttpMethod httpMethod, Operation potentialOperation, String potentialPathTemplate, ODataRoute oDataRoute, HttpConfiguration httpConfig) at Swashbuckle.OData.Descriptions.SwaggerRouteStrategy.GetActionDescriptors(SwaggerRoute potentialSwaggerRoute, HttpConfiguration httpConfig) at Swashbuckle.OData.Descriptions.SwaggerRouteStrategy.<>c__DisplayClass3_0.<Generate>b__1(SwaggerRoute potentialSwaggerRoute) at System.Linq.Enumerable.<SelectManyIterator>d__16`2.MoveNext() at System.Linq.Enumerable.<SelectManyIterator>d__16`2.MoveNext() at System.Linq.Enumerable.<SelectManyIterator>d__16`2.MoveNext() at System.Linq.Enumerable.<DistinctIterator>d__63`1.MoveNext() at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection) at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source) at Swashbuckle.OData.CollectionExtentions.ToCollection[T](IEnumerable`1 source) at Swashbuckle.OData.Descriptions.ODataApiExplorer.GetApiDescriptions() at System.Lazy`1.CreateValue() at System.Lazy`1.LazyInitValue() at Swashbuckle.OData.Descriptions.ODataApiExplorer.get_ApiDescriptions() at Swashbuckle.OData.ODataSwaggerProvider.GetApiDescriptionsFor(String apiVersion) at Swashbuckle.OData.ODataSwaggerProvider.GetSwagger(String rootUrl, String apiVersion) at Swashbuckle.Application.SwaggerDocsHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) at System.Net.Http.HttpMessageInvoker.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) at System.Web.Http.Dispatcher.HttpRoutingDispatcher.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) at System.Net.Http.DelegatingHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) at System.Web.Http.HttpServer.<>n__FabricatedMethod9(HttpRequestMessage , CancellationToken ) at System.Web.Http.HttpServer.<SendAsync>d__0.MoveNext()"},"comment":{"url":"https://api.github.com/repos/rbeauchamp/Swashbuckle.OData/issues/comments/181191118","html_url":"https://github.com/rbeauchamp/Swashbuckle.OData/issues/57#issuecomment-181191118","issue_url":"https://api.github.com/repos/rbeauchamp/Swashbuckle.OData/issues/57","id":181191118,"user":{"login":"rbeauchamp-lendingtree","id":5412021,"avatar_url":"https://avatars.githubusercontent.com/u/5412021?v=3","gravatar_id":"","url":"https://api.github.com/users/rbeauchamp-lendingtree","html_url":"https://github.com/rbeauchamp-lendingtree","followers_url":"https://api.github.com/users/rbeauchamp-lendingtree/followers","following_url":"https://api.github.com/users/rbeauchamp-lendingtree/following{/other_user}","gists_url":"https://api.github.com/users/rbeauchamp-lendingtree/gists{/gist_id}","starred_url":"https://api.github.com/users/rbeauchamp-lendingtree/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rbeauchamp-lendingtree/subscriptions","organizations_url":"https://api.github.com/users/rbeauchamp-lendingtree/orgs","repos_url":"https://api.github.com/users/rbeauchamp-lendingtree/repos","events_url":"https://api.github.com/users/rbeauchamp-lendingtree/events{/privacy}","received_events_url":"https://api.github.com/users/rbeauchamp-lendingtree/received_events","type":"User","site_admin":false},"created_at":"2016-02-08T04:30:54Z","updated_at":"2016-02-08T04:30:54Z","body":"@wbreza @JAMSUPREME  v2.14.0 now supports route prefixes that contain parameters. \r\n\r\nPlease see the [documentation on this feature](https://github.com/rbeauchamp/Swashbuckle.OData#route-prefixes-that-have-parameters).\r\n\r\nGive it a try and let me know if you find any issues. Thanks!"}}