File tree Expand file tree Collapse file tree 3 files changed +7
-1
lines changed Expand file tree Collapse file tree 3 files changed +7
-1
lines changed Original file line number Diff line number Diff line change 44var builder = WebApplication . CreateBuilder ( args ) ;
55
66builder . Services . AddSqlite < MyContext > ( "Data Source=contacts.db" ) ;
7+ builder . Services . AddEndpointsApiExplorer ( ) ;
8+ builder . Services . AddSwaggerGen ( ) ;
79
810var app = builder . Build ( ) ;
911
1517
1618} ) ;
1719
20+ app . UseSwagger ( ) ;
21+ app . UseSwaggerUI ( ) ;
22+
1823app . Run ( ) ;
Original file line number Diff line number Diff line change 1111 "WorkingApi" : {
1212 "commandName" : " Project" ,
1313 "launchBrowser" : true ,
14- "launchUrl" : " api/Contacts " ,
14+ "launchUrl" : " swagger/index.html " ,
1515 "environmentVariables" : {
1616 "ASPNETCORE_ENVIRONMENT" : " Development"
1717 },
Original file line number Diff line number Diff line change 1515 </PackageReference >
1616 <PackageReference Include =" Microsoft.EntityFrameworkCore.Sqlite" Version =" 6.0.2" />
1717 <PackageReference Include =" Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version =" 1.14.0" />
18+ <PackageReference Include =" Swashbuckle.AspNetCore" Version =" 6.2.3" />
1819 </ItemGroup >
1920
2021 <ItemGroup >
You can’t perform that action at this time.
0 commit comments