SwaggerDoc改用配置方式
This commit is contained in:
parent
d8124d4a61
commit
717092bce3
|
@ -27,4 +27,10 @@
|
|||
<ProjectReference Include="..\FAuth.Database\FAuth.DataBase.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="Tools\" />
|
||||
</ItemGroup>
|
||||
|
||||
<ProjectExtensions><VisualStudio><UserProperties appsettings_1json__JsonSchema="" /></VisualStudio></ProjectExtensions>
|
||||
|
||||
</Project>
|
||||
|
|
|
@ -65,13 +65,14 @@ namespace FAuth
|
|||
|
||||
//×¢²áSwagger
|
||||
services.AddSwaggerGen(c => {
|
||||
var option = this.Configuration.GetSection("SwaggerDoc");
|
||||
c.SwaggerDoc("V1",new OpenApiInfo {
|
||||
Title = "接口文档",
|
||||
Version = "1.0",
|
||||
Description = "api",
|
||||
Title = option.GetValue<string>("Title"),
|
||||
Version = option.GetValue<string>("Version"),
|
||||
Description = option.GetValue<string>("Description"),
|
||||
Contact = new OpenApiContact {
|
||||
Name = "Falcon",
|
||||
Url = new Uri("http://39.105.71.191/Falcon/FAuth"),
|
||||
Name = option.GetValue<string>("Contact:Name"),
|
||||
Url = new Uri(option.GetValue<string>("Contact:Url")),
|
||||
},
|
||||
});
|
||||
var xmlPath = Path.Combine(AppContext.BaseDirectory,typeof(Program).Assembly.GetName().Name + ".xml");
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{
|
||||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
|
@ -19,5 +19,14 @@
|
|||
"UserTicketDecryptorOption": {
|
||||
"Key": "abcd"
|
||||
},
|
||||
"urls": "http://*:9000;https://*:9001"
|
||||
"urls": "http://*:9000;https://*:9001",
|
||||
"SwaggerDoc": {
|
||||
"Title": "Falcon SSO 统一登录接口文档",
|
||||
"Version": "1.0",
|
||||
"Description": "统一采用API接口设计,查下下面详细接口规范。",
|
||||
"Contact": {
|
||||
"Name": "技术支持(点击链接,发布工单)",
|
||||
"Url": "http://39.105.71.191/Falcon/FalconSSO/issues"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user