abpframework / abp

Open Source Web Application Framework for ASP.NET Core. Offers an opinionated architecture to build enterprise software solutions with best practices on top of the .NET and the ASP.NET Core platforms. Provides the fundamental infrastructure, production-ready startup templates, application modules, UI themes, tooling, guides and documentation.
https://abp.io
GNU Lesser General Public License v3.0
12.31k stars 3.32k forks source link

HideAbpEndpoints also hides endpoints when I use v{version:apiVersion} in route #19636

Closed xiaoxiaotank closed 2 days ago

xiaoxiaotank commented 2 weeks ago

Is there an existing issue for this?

Description

When I use api versioning, the apis can't show in swagger ui,like this:

[ApiController]
[ApiVersion("1.0")]
[Route("api/v{version:apiVersion}/[controller]")]
public class MyController : ControllerBase {}

I guess it is beacause AbpSwashbuckleDocumentFilter.RemoveRouteParameterConstraints, it transform api/v{version:apiVersion}/my to api/v{version}/my, rather than api/v1/myapi/v2/my and etc.

Reproduction Steps

No response

Expected behavior

No response

Actual behavior

No response

Regression?

No response

Known Workarounds

No response

Version

8.1

User Interface

Common (Default)

Database Provider

EF Core (Default)

Tiered or separate authentication server

Tiered

Operation System

Windows (Default)

Other information

https://github.com/abpframework/abp/issues/15712

maliming commented 2 weeks ago

hi

maliming commented 2 days ago

Reopen if you still have this problem.