Browse Source

Added swagger UI to the bookstore sample.

pull/318/head
Halil ibrahim Kalkan 8 years ago
parent
commit
a04fd3efeb
  1. 8
      samples/BookStore/src/Acme.BookStore.Web/BookStoreWebModule.cs

8
samples/BookStore/src/Acme.BookStore.Web/BookStoreWebModule.cs

@ -86,8 +86,6 @@ namespace Acme.BookStore
services.Configure<VirtualFileSystemOptions>(options => services.Configure<VirtualFileSystemOptions>(options =>
{ {
options.FileSets.ReplaceEmbeddedByPyhsical<BookStoreDomainModule>(Path.Combine(hostingEnvironment.ContentRootPath, "..\\Acme.BookStore.Domain")); options.FileSets.ReplaceEmbeddedByPyhsical<BookStoreDomainModule>(Path.Combine(hostingEnvironment.ContentRootPath, "..\\Acme.BookStore.Domain"));
}); });
} }
} }
@ -151,6 +149,12 @@ namespace Acme.BookStore
app.UseRequestLocalization(app.ApplicationServices.GetRequiredService<IOptions<RequestLocalizationOptions>>().Value); app.UseRequestLocalization(app.ApplicationServices.GetRequiredService<IOptions<RequestLocalizationOptions>>().Value);
app.UseSwagger();
app.UseSwaggerUI(options =>
{
options.SwaggerEndpoint("/swagger/v1/swagger.json", "BookStore API");
});
app.UseMvc(routes => app.UseMvc(routes =>
{ {
routes.MapRoute( routes.MapRoute(

Loading…
Cancel
Save