Browse Source

Support HideAbpEndpoints method for optional query parameter.

Resolves #14172
pull/14187/head
Engincan VESKE 3 years ago
parent
commit
2cf53087d7
  1. 2
      framework/src/Volo.Abp.Swashbuckle/Volo/Abp/Swashbuckle/AbpSwashbuckleDocumentFilter.cs

2
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();

Loading…
Cancel
Save