Browse Source

Merge pull request #16717 from abpframework/auto-merge/rel-7-2/1972

Merge branch dev with rel-7.2
pull/16722/head
Berkan Sasmaz 3 years ago
committed by GitHub
parent
commit
609b51f7e5
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 25
      docs/en/API/Swagger-Integration.md
  2. 6
      docs/en/Background-Jobs-Hangfire.md

25
docs/en/API/Swagger-Integration.md

@ -43,7 +43,7 @@ If you want to manually install;
## Configuration
First, we need to use `AddAbpSwaggerGen` extension to configure Swagger in `ConfigureServices` method of our module.
First, we need to use `AddAbpSwaggerGen` extension to configure Swagger in `ConfigureServices` method of our module:
```csharp
public override void ConfigureServices(ServiceConfigurationContext context)
@ -63,21 +63,21 @@ public override void ConfigureServices(ServiceConfigurationContext context)
}
```
Then we can use Swagger UI by calling `UseAbpSwaggerUI` method in the `OnApplicationInitialization` method of our module.
Then we can use Swagger UI by calling `UseAbpSwaggerUI` method in the `OnApplicationInitialization` method of our module:
```csharp
public override void OnApplicationInitialization(ApplicationInitializationContext context)
{
var app = context.GetApplicationBuilder();
//... other configarations.
//... other configurations.
app.UseAbpSwaggerUI(options =>
{
options.SwaggerEndpoint("/swagger/v1/swagger.json", "Test API");
});
//... other configarations.
//... other configurations.
}
```
@ -103,9 +103,7 @@ For non MVC/Tiered applications, we need to configure Swagger with OAUTH to hand
> ABP Framework uses OpenIddict by default. To get more information about OpenIddict, check this [documentation](../Modules/OpenIddict.md).
To do that, we need to use `AddAbpSwaggerGenWithOAuth` extension to configure Swagger with OAuth issuer and scopes in `ConfigureServices` method of our module.
To do that, we need to use `AddAbpSwaggerGenWithOAuth` extension to configure Swagger with OAuth issuer and scopes in `ConfigureServices` method of our module:
```csharp
public override void ConfigureServices(ServiceConfigurationContext context)
@ -130,17 +128,14 @@ public override void ConfigureServices(ServiceConfigurationContext context)
}
```
Then we can use Swagger UI by calling `UseAbpSwaggerUI` method in the `OnApplicationInitialization` method of our module.
> Do not forget to set `OAuthClientId` and `OAuthClientSecret`.
Then we can use Swagger UI by calling `UseAbpSwaggerUI` method in the `OnApplicationInitialization` method of our module:
```csharp
public override void OnApplicationInitialization(ApplicationInitializationContext context)
{
var app = context.GetApplicationBuilder();
//... other configarations.
//... other configurations.
app.UseAbpSwaggerUI(options =>
{
@ -151,6 +146,8 @@ public override void OnApplicationInitialization(ApplicationInitializationContex
options.OAuthClientSecret("1q2w3e*"); // clientSecret
});
//... other configarations.
//... other configurations.
}
```
```
> Do not forget to set `OAuthClientId` and `OAuthClientSecret`.

6
docs/en/Background-Jobs-Hangfire.md

@ -52,7 +52,7 @@ After you have installed these NuGet packages, you need to configure your projec
var configuration = context.Services.GetConfiguration();
var hostingEnvironment = context.Services.GetHostingEnvironment();
//... other configarations.
//... other configurations.
ConfigureHangfire(context, configuration);
}
@ -68,7 +68,7 @@ After you have installed these NuGet packages, you need to configure your projec
> You have to configure a storage for Hangfire.
2. If you want to use hangfire's dashboard, you can add `UseHangfireDashboard` call in the `OnApplicationInitialization` method in `Module` class
2. If you want to use hangfire's dashboard, you can add `UseHangfireDashboard` call in the `OnApplicationInitialization` method in `Module` class:
````csharp
public override void OnApplicationInitialization(ApplicationInitializationContext context)
@ -84,7 +84,7 @@ After you have installed these NuGet packages, you need to configure your projec
### Specifying Queue
You can use the [`QueueAttribute`](https://docs.hangfire.io/en/latest/background-processing/configuring-queues.html) to specify the queue.
You can use the [`QueueAttribute`](https://docs.hangfire.io/en/latest/background-processing/configuring-queues.html) to specify the queue:
````csharp
using System.Threading.Tasks;

Loading…
Cancel
Save