rbeauchamp / Swashbuckle.OData

Extends Swashbuckle with OData v4 support!
Other
129 stars 96 forks source link

Versioned OData routes #166

Closed bdebaere closed 4 years ago

bdebaere commented 6 years ago

Hi rbeauchamp,

Does your package not support versioned OData routes?

I receive the error below when trying with: httpConfiguration.MapVersionedODataRoutes()

See the examples on their Github: https://github.com/Microsoft/aspnet-api-versioning/

System.ArgumentNullException: 'Value cannot be null. Parameter name: routeData'

Call stack:

Swashbuckle.OData.dll!Swashbuckle.OData.Descriptions.SwaggerRouteStrategy.CreateHttpRequestMessage(System.Net.Http.HttpMethod httpMethod, Swashbuckle.Swagger.Operation potentialOperation, Swashbuckle.OData.Descriptions.SwaggerRoute potentialSwaggerRoute, System.Web.Http.HttpConfiguration httpConfig) Line 105   C#  Symbols loaded.
    Swashbuckle.OData.dll!Swashbuckle.OData.Descriptions.SwaggerRouteStrategy.GetActionDescriptors(System.Net.Http.HttpMethod httpMethod, Swashbuckle.Swagger.Operation potentialOperation, Swashbuckle.OData.Descriptions.SwaggerRoute potentialSwaggerRoute, System.Web.Http.HttpConfiguration httpConfig) Line 67    C#  Symbols loaded.
    Swashbuckle.OData.dll!Swashbuckle.OData.Descriptions.SwaggerRouteStrategy.GetActionDescriptors(Swashbuckle.OData.Descriptions.SwaggerRoute potentialSwaggerRoute, System.Web.Http.HttpConfiguration httpConfig) Line 52 C#  Symbols loaded.
    Swashbuckle.OData.dll!Swashbuckle.OData.Descriptions.SwaggerRouteStrategy.Generate.AnonymousMethod__1(Swashbuckle.OData.Descriptions.SwaggerRoute potentialSwaggerRoute) Line 41    C#  Symbols loaded.
    [External Code]     Annotated Frame
    Swashbuckle.OData.dll!Swashbuckle.OData.CollectionExtentions.ToCollection<System.Web.Http.Description.ApiDescription>(System.Collections.Generic.IEnumerable<System.Web.Http.Description.ApiDescription> source) Line 77    C#  Symbols loaded.
    Swashbuckle.OData.dll!Swashbuckle.OData.Descriptions.ODataApiExplorer.GetApiDescriptions() Line 43  C#  Symbols loaded.
    [External Code]     Annotated Frame
    Swashbuckle.OData.dll!Swashbuckle.OData.Descriptions.ODataApiExplorer.ApiDescriptions.get() Line 39 C#  Symbols loaded.
    Swashbuckle.OData.dll!Swashbuckle.OData.ODataSwaggerProvider.GetApiDescriptionsFor(string apiVersion) Line 317  C#  Symbols loaded.
    Swashbuckle.OData.dll!Swashbuckle.OData.ODataSwaggerProvider.GenerateSwagger(string rootUrl, string apiVersion) Line 79 C#  Symbols loaded.
    Swashbuckle.OData.dll!Swashbuckle.OData.ODataSwaggerProvider.GetSwagger(string rootUrl, string apiVersion) Line 56  C#  Symbols loaded.
    [External Code]     Annotated Frame
alexandery commented 6 years ago

Any extra information on this? Running into the same situation and am wondering what can be done at this point.