diff --git a/docs/en/API/Swagger-Integration.md b/docs/en/API/Swagger-Integration.md index 2e7b331cfc..191fa634ca 100644 --- a/docs/en/API/Swagger-Integration.md +++ b/docs/en/API/Swagger-Integration.md @@ -48,9 +48,9 @@ First, we need to use `AddAbpSwaggerGen` extension to configure Swagger in `Conf ```csharp public override void ConfigureServices(ServiceConfigurationContext context) { - var services = contex.Services; + var services = context.Services; - //... other configarations. + //... other configurations. services.AddAbpSwaggerGen( options => @@ -81,6 +81,22 @@ public override void OnApplicationInitialization(ApplicationInitializationContex } ``` +### Hide ABP Endpoints on Swagger UI + +If you want to hide ABP's default endpoints, call the `HideAbpEndpoints` method in your Swagger configuration as shown in the following example: + +```csharp +services.AddAbpSwaggerGen( + options => + { + //... other options + + //Hides ABP Related endpoints on Swagger UI + options.HideAbpEndpoints(); + } +) +``` + ## Using Swagger with OAUTH For non MVC/Tiered applications, we need to configure Swagger with OAUTH to handle authorization. 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 5fd05a1460..8bd9c0c81b 100644 --- a/framework/src/Volo.Abp.Swashbuckle/Volo/Abp/Swashbuckle/AbpSwashbuckleDocumentFilter.cs +++ b/framework/src/Volo.Abp.Swashbuckle/Volo/Abp/Swashbuckle/AbpSwashbuckleDocumentFilter.cs @@ -8,7 +8,7 @@ namespace Volo.Abp.Swashbuckle; public class AbpSwashbuckleDocumentFilter : IDocumentFilter { - protected string[] ActionUrlPrefixes = new[] {"Volo.Abp"}; + protected string[] ActionUrlPrefixes = new[] {"Volo."}; public virtual void Apply(OpenApiDocument swaggerDoc, DocumentFilterContext context) {