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