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
9c81e65b
Commit
9c81e65b
authored
Mar 08, 2019
by
zry
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove swagger
parent
de545122
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
13 deletions
+13
-13
performance/Performance.Api/Startup.cs
+13
-13
No files found.
performance/Performance.Api/Startup.cs
View file @
9c81e65b
...
@@ -95,10 +95,10 @@ public void ConfigureServices(IServiceCollection services)
...
@@ -95,10 +95,10 @@ public void ConfigureServices(IServiceCollection services)
.
Configure
<
Application
>(
Configuration
.
GetSection
(
"Application"
))
.
Configure
<
Application
>(
Configuration
.
GetSection
(
"Application"
))
.
Configure
<
HuyiSmsConfig
>(
Configuration
.
GetSection
(
"HuyiSmsConfig"
));
.
Configure
<
HuyiSmsConfig
>(
Configuration
.
GetSection
(
"HuyiSmsConfig"
));
services
.
AddSwaggerGen
(
c
=>
//
services.AddSwaggerGen(c =>
{
//
{
c
.
SwaggerDoc
(
"v1"
,
new
Info
{
Title
=
"My API"
,
Version
=
"v1"
});
//
c.SwaggerDoc("v1", new Info { Title = "My API", Version = "v1" });
});
//
});
//huyi短信发送注入
//huyi短信发送注入
services
.
AddScoped
<
HuyiSmsNotify
>();
services
.
AddScoped
<
HuyiSmsNotify
>();
...
@@ -125,16 +125,16 @@ public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerF
...
@@ -125,16 +125,16 @@ public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerF
{
{
app
.
UseStatusCodePagesWithReExecute
(
"/error/{0}"
);
app
.
UseStatusCodePagesWithReExecute
(
"/error/{0}"
);
}
}
// Enable middleware to serve generated Swagger as a JSON endpoint.
//
//
Enable middleware to serve generated Swagger as a JSON endpoint.
app
.
UseSwagger
();
//
app.UseSwagger();
// Enable middleware to serve swagger-ui (HTML, JS, CSS, etc.),
//
//
Enable middleware to serve swagger-ui (HTML, JS, CSS, etc.),
// specifying the Swagger JSON endpoint.
//
//
specifying the Swagger JSON endpoint.
app
.
UseSwaggerUI
(
c
=>
//
app.UseSwaggerUI(c =>
{
//
{
c
.
SwaggerEndpoint
(
"/swagger/v1/swagger.json"
,
"My API V1"
);
//
c.SwaggerEndpoint("/swagger/v1/swagger.json", "My API V1");
c
.
RoutePrefix
=
string
.
Empty
;
//
c.RoutePrefix = string.Empty;
});
//
});
loggerFactory
.
CreateLogger
<
Startup
>().
LogDebug
(
env
.
EnvironmentName
);
loggerFactory
.
CreateLogger
<
Startup
>().
LogDebug
(
env
.
EnvironmentName
);
...
...
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