mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-07-15 05:13:25 +08:00
fix issue #I3QBZI
add swagger example value
This commit is contained in:
parent
2834a62fc7
commit
a681549bd8
@ -2,7 +2,15 @@
|
||||
{
|
||||
public class PageReq
|
||||
{
|
||||
/// <summary>
|
||||
/// 页码
|
||||
/// </summary>
|
||||
/// <example>1</example>
|
||||
public int page { get; set; }
|
||||
/// <summary>
|
||||
/// 每页条数
|
||||
/// </summary>
|
||||
/// <example>10</example>
|
||||
public int limit { get; set; }
|
||||
|
||||
public string key { get; set; }
|
||||
|
@ -12,6 +12,7 @@ namespace OpenAuth.App.SSO
|
||||
/// <summary>
|
||||
/// 应用的AppSecrect,目前没判定可以随便填一个。如果需要判定请根据注释调整LoginParse.Do方法
|
||||
/// </summary>
|
||||
/// <example>openauth</example>
|
||||
public string AppKey { get; set; }
|
||||
|
||||
public void Trim()
|
||||
|
@ -41,13 +41,13 @@ namespace OpenAuth.WebApi
|
||||
public void ConfigureServices(IServiceCollection services)
|
||||
{
|
||||
services.Configure<ApiBehaviorOptions>(options => { options.SuppressModelStateInvalidFilter = true; });
|
||||
|
||||
services.AddSingleton(provider =>
|
||||
|
||||
//在startup中需要强制创建log4net
|
||||
var loggerFactory = LoggerFactory.Create(builder =>
|
||||
{
|
||||
var service = provider.GetRequiredService<ILogger<StartupLogger>>();
|
||||
return new StartupLogger(service);
|
||||
builder.AddLog4Net();
|
||||
});
|
||||
var logger = services.BuildServiceProvider().GetRequiredService<StartupLogger>();
|
||||
ILogger logger = loggerFactory.CreateLogger<Startup>();
|
||||
|
||||
var identityServer =
|
||||
((ConfigurationSection) Configuration.GetSection("AppSetting:IdentityServerUrl")).Value;
|
||||
@ -215,7 +215,7 @@ namespace OpenAuth.WebApi
|
||||
controller.Name.Replace("Controller", ""));
|
||||
}
|
||||
|
||||
c.DocExpansion(DocExpansion.None);
|
||||
c.DocExpansion(DocExpansion.List); //默认展开列表
|
||||
c.OAuthClientId("OpenAuth.WebApi"); //oauth客户端名称
|
||||
c.OAuthAppName("开源版webapi认证"); // 描述
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user