@@ -148,7 +148,7 @@ public static IServiceCollection AddSwaggerOptions(this IServiceCollection servi
148
148
Id = "Bearer"
149
149
}
150
150
} ,
151
- new string [ ] { }
151
+ Array . Empty < string > ( )
152
152
}
153
153
} ) ;
154
154
@@ -170,44 +170,16 @@ public static IServiceCollection AddSwaggerOptions(this IServiceCollection servi
170
170
} ) ;
171
171
#endregion
172
172
173
- //options.AddSecurityDefinition("Bearer", new OpenApiSecurityScheme
174
- //{
175
- // Description = "JWT Authorization header using the Bearer scheme. Example: \"Authorization: Bearer {token}\"",
176
- // Name = "Authorization",
177
- // In = ParameterLocation.Header,
178
- // Type = SecuritySchemeType.ApiKey,
179
- // Scheme = "Bearer"
180
- //});
181
-
182
173
//If use FluentValidation then must be use this package to show validation in swagger (MicroElements.Swashbuckle.FluentValidation)
183
174
//options.AddFluentValidationRules();
184
175
#endregion
185
176
} ) ;
186
177
187
- //services.AddSwaggerGen(c =>
188
- //{
189
- // c.SwaggerDoc("v1", new OpenApiInfo
190
- // {
191
- // Version = "v1",
192
- // Title = "CleanTemplate.WebUI",
193
- // Description = "This is a solution template for Clean Architecture implementation with ASP.NET Core Web Api",
194
- // Contact = new OpenApiContact
195
- // {
196
- // Name = "Omid Ahmadpour",
197
- // Email = "ahmadpooromid@gmail.com",
198
- // Url = new Uri("https://github.com/omidah"),
199
- // },
200
- // });
201
- //});
202
-
203
178
return services ;
204
179
}
205
180
206
181
public static IApplicationBuilder UseAppSwagger ( this IApplicationBuilder app , IConfiguration configuration )
207
182
{
208
- //app.UseSwagger();
209
- //app.UseSwaggerUI(c => c.SwaggerEndpoint("/swagger/v1/swagger.json", "CleanTemplate.WebUI v1"));
210
-
211
183
app . UseSwagger ( ) ;
212
184
213
185
//Swagger middleware for generate UI from swagger.json
0 commit comments