diff --git a/framework/src/Volo.Abp.Swashbuckle/Volo/Abp/Swashbuckle/AbpSwashbuckleDocumentFilter.cs b/framework/src/Volo.Abp.Swashbuckle/Volo/Abp/Swashbuckle/AbpSwashbuckleDocumentFilter.cs index 8bd9c0c81b..5e86c04189 100644 --- a/framework/src/Volo.Abp.Swashbuckle/Volo/Abp/Swashbuckle/AbpSwashbuckleDocumentFilter.cs +++ b/framework/src/Volo.Abp.Swashbuckle/Volo/Abp/Swashbuckle/AbpSwashbuckleDocumentFilter.cs @@ -17,7 +17,7 @@ public class AbpSwashbuckleDocumentFilter : IDocumentFilter .Where(actionDescriptor => !string.IsNullOrEmpty(actionDescriptor.DisplayName) && ActionUrlPrefixes.Any(actionUrlPrefix => !actionDescriptor.DisplayName.Contains(actionUrlPrefix))) .DistinctBy(actionDescriptor => actionDescriptor.AttributeRouteInfo?.Template) - .Select(actionDescriptor => actionDescriptor.AttributeRouteInfo?.Template.EnsureStartsWith('/')) + .Select(actionDescriptor => actionDescriptor.AttributeRouteInfo?.Template?.EnsureStartsWith('/').Replace("?", "")) .Where(actionUrl => !string.IsNullOrEmpty(actionUrl)) .ToList();