From 717092bce3cc2566e686afee46fd6c3c93c94be3 Mon Sep 17 00:00:00 2001
From: falcon <9504402@qq.com>
Date: Sun, 26 Apr 2020 14:49:31 +0800
Subject: [PATCH] =?UTF-8?q?SwaggerDoc=E6=94=B9=E7=94=A8=E9=85=8D=E7=BD=AE?=
=?UTF-8?q?=E6=96=B9=E5=BC=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
FAuth/FAuth.csproj | 6 ++++++
FAuth/Startup.cs | 11 ++++++-----
FAuth/appsettings.json | 13 +++++++++++--
3 files changed, 23 insertions(+), 7 deletions(-)
diff --git a/FAuth/FAuth.csproj b/FAuth/FAuth.csproj
index be6e447..82a9744 100644
--- a/FAuth/FAuth.csproj
+++ b/FAuth/FAuth.csproj
@@ -27,4 +27,10 @@
+
+
+
+
+
+
diff --git a/FAuth/Startup.cs b/FAuth/Startup.cs
index 16c5b25..f6ea336 100644
--- a/FAuth/Startup.cs
+++ b/FAuth/Startup.cs
@@ -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("Title"),
+ Version = option.GetValue("Version"),
+ Description = option.GetValue("Description"),
Contact = new OpenApiContact {
- Name = "Falcon",
- Url = new Uri("http://39.105.71.191/Falcon/FAuth"),
+ Name = option.GetValue("Contact:Name"),
+ Url = new Uri(option.GetValue("Contact:Url")),
},
});
var xmlPath = Path.Combine(AppContext.BaseDirectory,typeof(Program).Assembly.GetName().Name + ".xml");
diff --git a/FAuth/appsettings.json b/FAuth/appsettings.json
index 4036d5f..e170643 100644
--- a/FAuth/appsettings.json
+++ b/FAuth/appsettings.json
@@ -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"
+ }
+ }
}