Browse Source

Merge pull request #14427 from abpframework/auto-merge/rel-6-0/1421

Merge branch dev with rel-6.0
pull/14433/head
Engincan VESKE 4 years ago
committed by GitHub
parent
commit
6d0d9815ef
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      docs/en/CLI.md
  2. 11
      framework/src/Volo.Abp.Swashbuckle/Microsoft/Extensions/DependencyInjection/AbpSwaggerGenServiceCollectionExtensions.cs

8
docs/en/CLI.md

@ -129,8 +129,8 @@ For more samples, go to [ABP CLI Create Solution Samples](CLI-New-Command-Sample
* `ef`: Entity Framework Core.
* `mongodb`: MongoDB.
* `--theme`: Specifes the theme. Default theme is `leptonx-lite`. Available themes:
* `leptonx-lite`: [LeptonX Lite Theme](/Themes/LeptonXLite/mvc.md).
* `basic`: [Basic Theme](/UI/AspNetCore/Basic-Theme.md).
* `leptonx-lite`: [LeptonX Lite Theme](Themes/LeptonXLite/AspNetCore.md).
* `basic`: [Basic Theme](UI/AspNetCore/Basic-Theme.md).
* **`module`**: [Module template](Startup-Templates/Module.md). Additional options:
* `--no-ui`: Specifies to not include the UI. This makes possible to create service-only modules (a.k.a. microservices - without UI).
* **`console`**: [Console template](Startup-Templates/Console.md).
@ -144,8 +144,8 @@ For more samples, go to [ABP CLI Create Solution Samples](CLI-New-Command-Sample
* `ef`: Entity Framework Core.
* `mongodb`: MongoDB.
* `--theme`: Specifes the theme. Default theme is `leptonx-lite`. Available themes:
* `leptonx-lite`: [LeptonX Lite Theme](/Themes/LeptonXLite/mvc.md).
* `basic`: [Basic Theme](/UI/AspNetCore/Basic-Theme.md).
* `leptonx-lite`: [LeptonX Lite Theme](Themes/LeptonXLite/AspNetCore.md).
* `basic`: [Basic Theme](UI/AspNetCore/Basic-Theme.md).
* **`maui`**: .NET MAUI. A minimalist .NET MAUI application will be created if you specify this option.
* `--output-folder` or `-o`: Specifies the output folder. Default value is the current directory.
* `--version` or `-v`: Specifies the ABP & template version. It can be a [release tag](https://github.com/abpframework/abp/releases) or a [branch name](https://github.com/abpframework/abp/branches). Uses the latest release if not specified. Most of the times, you will want to use the latest version.

11
framework/src/Volo.Abp.Swashbuckle/Microsoft/Extensions/DependencyInjection/AbpSwaggerGenServiceCollectionExtensions.cs

@ -33,8 +33,13 @@ public static class AbpSwaggerGenServiceCollectionExtensions
this IServiceCollection services,
[NotNull] string authority,
[NotNull] Dictionary<string, string> scopes,
Action<SwaggerGenOptions> setupAction = null)
Action<SwaggerGenOptions> setupAction = null,
string authorizationEndpoint = "/connect/authorize",
string tokenEndpoint = "/connect/token")
{
var authorizationUrl = new Uri($"{authority.TrimEnd('/')}{authorizationEndpoint.EnsureStartsWith('/')}");
var tokenUrl = new Uri($"{authority.TrimEnd('/')}{tokenEndpoint.EnsureStartsWith('/')}");
return services
.AddAbpSwaggerGen()
.AddSwaggerGen(
@ -47,9 +52,9 @@ public static class AbpSwaggerGenServiceCollectionExtensions
{
AuthorizationCode = new OpenApiOAuthFlow
{
AuthorizationUrl = new Uri($"{authority.EnsureEndsWith('/')}connect/authorize"),
AuthorizationUrl = authorizationUrl,
Scopes = scopes,
TokenUrl = new Uri($"{authority.EnsureEndsWith('/')}connect/token")
TokenUrl = tokenUrl
}
}
});

Loading…
Cancel
Save