Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
performance
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zry
performance
Commits
8f5ffe65
Commit
8f5ffe65
authored
Apr 02, 2022
by
ruyun.zhang@suvalue.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Swagger 配置调整
parent
f47de63f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
12 deletions
+15
-12
performance/Performance.Api/Configurations/SwaggerConfig.cs
+12
-12
performance/Performance.Api/Performance.Api.csproj
+3
-0
No files found.
performance/Performance.Api/Configurations/SwaggerConfig.cs
View file @
8f5ffe65
...
@@ -19,20 +19,20 @@ public static void AddSwaggerConfiguration(this IServiceCollection services)
...
@@ -19,20 +19,20 @@ public static void AddSwaggerConfiguration(this IServiceCollection services)
{
{
c
.
SwaggerDoc
(
"v1"
,
new
OpenApiInfo
{
Version
=
"v1.0"
,
Title
=
"绩效API接口"
});
c
.
SwaggerDoc
(
"v1"
,
new
OpenApiInfo
{
Version
=
"v1.0"
,
Title
=
"绩效API接口"
});
//
var xmlPath = new string[]
var
xmlPath
=
new
string
[]
//
{
{
//
Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "wwwroot", "Performance.Api.xml"),
Path
.
Combine
(
AppDomain
.
CurrentDomain
.
BaseDirectory
,
"wwwroot"
,
"Performance.Api.xml"
),
//
Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "wwwroot", "Performance.DtoModels.xml"),
Path
.
Combine
(
AppDomain
.
CurrentDomain
.
BaseDirectory
,
"wwwroot"
,
"Performance.DtoModels.xml"
),
//
Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "wwwroot", "Performance.EntityModels.xml"),
Path
.
Combine
(
AppDomain
.
CurrentDomain
.
BaseDirectory
,
"wwwroot"
,
"Performance.EntityModels.xml"
),
//
};
};
//
foreach (var item in xmlPath)
foreach
(
var
item
in
xmlPath
)
//
{
{
//
c.IncludeXmlComments(item, true);
c
.
IncludeXmlComments
(
item
,
true
);
//
}
}
var
xmlPathsss
=
Path
.
Combine
(
AppDomain
.
CurrentDomain
.
BaseDirectory
,
"wwwroot"
,
"Performance.Api.xml"
);
//
var xmlPathsss = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "wwwroot", "Performance.Api.xml");
c
.
IncludeXmlComments
(
xmlPathsss
,
true
);
//
c.IncludeXmlComments(xmlPathsss, true);
// Token绑定到ConfigureServices
// Token绑定到ConfigureServices
var
security
=
new
OpenApiSecurityRequirement
var
security
=
new
OpenApiSecurityRequirement
...
...
performance/Performance.Api/Performance.Api.csproj
View file @
8f5ffe65
...
@@ -48,6 +48,9 @@
...
@@ -48,6 +48,9 @@
<Content Update="wwwroot\Performance.Api.xml">
<Content Update="wwwroot\Performance.Api.xml">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</Content>
<Content Update="wwwroot\Performance.DtoModels.xml">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Update="wwwroot\Performance.EntityModels.xml">
<Content Update="wwwroot\Performance.EntityModels.xml">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</Content>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment