Browse Source

Merge pull request #14187 from abpframework/issue-14172

Support HideAbpEndpoints method for optional query parameter
pull/14192/head
maliming 4 years ago
committed by GitHub
parent
commit
7122abe7dd
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  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