OrchardCMS / Orchard

Orchard is a free, open source, community-focused Content Management System built on the ASP.NET MVC platform.
https://orchardproject.net
BSD 3-Clause "New" or "Revised" License
2.37k stars 1.12k forks source link

Orchard is not working with swagger, wrong routes definition. #8442

Closed vitozbazin closed 3 years ago

vitozbazin commented 3 years ago

I cannot make the orchard cms run with swagger because it seems that orchard does not follow swagger route policies in asp.net core 3.0.

I got following exception:

The request matched multiple endpoints. Matches: \r\n\r\nOrchardCore.Contents.Controllers.AdminController.List (OrchardCore.Contents)\r\nOrchardCore.Email.Controllers.AdminController.Index (OrchardCore.Email)\r\nOrchardCore.Apis.GraphQL.Controllers.AdminController.Index (OrchardCore.Apis.GraphQL)\r\nOrchardCore.Sitemaps.Controllers.AdminController.Edit (OrchardCore.Sitemaps)\r\nOrchardCore.Contents.Controllers.AdminController.Edit it comes from:

Microsoft.AspNetCore.Routing.Matching.DefaultEndpointSelector.ReportAmbiguity(CandidateState[] candidateState)\r\n at Microsoft.AspNetCore.Routing.Matching.DefaultEndpointSelector.ProcessFinalCandidates(HttpContext httpContext, CandidateState[] candidateState)\r\n at Microsoft.AspNetCore.Routing.Matching.DefaultEndpointSelector.Select(HttpContext httpContext, CandidateState[] candidateState)\r\n at Microsoft.AspNetCore.Routing.Matching.DefaultEndpointSelector.SelectAsync(HttpContext httpContext, CandidateSet candidateSet)\r\n

MatteoPiovanelli-Laser commented 3 years ago

From the namespaces, I would think this is an issue for https://github.com/OrchardCMS/OrchardCore . Am I correct? Please close this issue in that case.