File tree Expand file tree Collapse file tree
src/Services/Payment/Payment.API Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99 <ItemGroup >
1010 <PackageReference Include =" Autofac.Extensions.DependencyInjection" Version =" 4.1.0" />
1111 <PackageReference Include =" Microsoft.AspNetCore.All" Version =" 2.0.0" />
12+ <PackageReference Include =" Swashbuckle.AspNetCore" Version =" 1.0.0" />
1213 </ItemGroup >
1314 <ItemGroup >
1415 <DotNetCliToolReference Include =" Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version =" 2.0.0" />
Original file line number Diff line number Diff line change 1616using RabbitMQ . Client ;
1717using System ;
1818using System . Threading . Tasks ;
19+ using Swashbuckle . AspNetCore . Swagger ;
1920
2021namespace Payment . API
2122{
@@ -75,6 +76,19 @@ public IServiceProvider ConfigureServices(IServiceCollection services)
7576 checks . AddValueTaskCheck ( "HTTP Endpoint" , ( ) => new ValueTask < IHealthCheckResult > ( HealthCheckResult . Healthy ( "Ok" ) ) ) ;
7677 } ) ;
7778
79+ // Add framework services.
80+ services . AddSwaggerGen ( options =>
81+ {
82+ options . DescribeAllEnumsAsStrings ( ) ;
83+ options . SwaggerDoc ( "v1" , new Swashbuckle . AspNetCore . Swagger . Info
84+ {
85+ Title = "eShopOnContainers - Payment HTTP API" ,
86+ Version = "v1" ,
87+ Description = "The Payment Microservice HTTP API. This is a Data-Driven/CRUD microservice sample" ,
88+ TermsOfService = "Terms Of Service"
89+ } ) ;
90+ } ) ;
91+
7892 RegisterEventBus ( services ) ;
7993
8094 var container = new ContainerBuilder ( ) ;
You can’t perform that action at this time.
0 commit comments