Open itsmegopi opened 4 years ago
I think odata is not really supported but there might be solutions in other issues in the issue tracker, search for odata (also closed).
https://github.com/microsoft/aspnet-api-versioning/issues/519
This has a wrok-around
We are trying to map the OData with NSwag but we are ended up lot of issues. We are using OData controllers instead of ControllerBase
Startup file configuration
services.AddOData(); services.AddSwaggerDocument();
Configure method app.UseMvc(builder => { builder.Select().Filter().Expand().MaxTop(1000).Count(); builder.MapODataServiceRoute("ODataRoutes", "api/v1", GetEdmModel(app.ApplicationServices)); builder.EnableDependencyInjection(); }); app.UseSwagger(); app.UseSwaggerUi3();`
Following is my controller
[Route("api/[controller]")] [ApiController]
We getting error like " /swagger/{documentName}/swagger.json"
Thanks