This repository was archived by the owner on Nov 20, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +23
-15
lines changed Expand file tree Collapse file tree 5 files changed +23
-15
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,10 @@ public class ShortenedLinksController : ControllerBase
12
12
{
13
13
private readonly DevEncurtaUrlDbContext _context ;
14
14
15
+ /// <summary>
16
+ /// Construtor
17
+ /// </summary>
18
+ /// <param name="context"></param>
15
19
public ShortenedLinksController ( DevEncurtaUrlDbContext context )
16
20
=> _context = context ;
17
21
Original file line number Diff line number Diff line change 1
- <Project Sdk =" Microsoft.NET.Sdk.Web" >
1
+ <Project Sdk =" Microsoft.NET.Sdk.Web" >
2
2
3
3
<PropertyGroup >
4
- <TargetFramework >net7.0</TargetFramework >
5
4
<Nullable >enable</Nullable >
6
5
<ImplicitUsings >enable</ImplicitUsings >
6
+ <TargetFramework >net7.0</TargetFramework >
7
+ <GenerateDocumentationFile >true</GenerateDocumentationFile >
8
+ <NoWarn >ASP0013;1591</NoWarn >
7
9
</PropertyGroup >
8
10
9
- <PropertyGroup >
10
- <GenerateDocumentationFile >true</GenerateDocumentationFile >
11
- <NoWarn >$(NoWarn);1591</NoWarn >
12
- <NoWarn >$(NoWarn);8618</NoWarn >
11
+ <PropertyGroup Condition =" '$(Configuration)|$(Platform)'=='Debug|AnyCPU'" >
12
+ <TreatWarningsAsErrors >True</TreatWarningsAsErrors >
13
+ </PropertyGroup >
14
+
15
+ <PropertyGroup Condition =" '$(Configuration)|$(Platform)'=='Release|AnyCPU'" >
16
+ <TreatWarningsAsErrors >True</TreatWarningsAsErrors >
13
17
</PropertyGroup >
14
-
18
+
15
19
<ItemGroup >
16
20
<PackageReference Include =" Microsoft.AspNetCore.OpenApi" Version =" 7.0.20" />
17
21
<PackageReference Include =" Microsoft.EntityFrameworkCore.Design" Version =" 7.0.20" >
Original file line number Diff line number Diff line change @@ -4,15 +4,15 @@ public class ShortenedCustomLink
4
4
{
5
5
public int Id { get ; set ; }
6
6
7
- public string Title { get ; set ; }
7
+ public string Title { get ; set ; } = string . Empty ;
8
8
9
- public string DestinationLink { get ; set ; }
9
+ public string DestinationLink { get ; set ; } = string . Empty ;
10
10
11
- public string ShortenedLink { get ; set ; }
11
+ public string ShortenedLink { get ; set ; } = string . Empty ;
12
12
13
- public string Code { get ; set ; }
13
+ public string Code { get ; set ; } = string . Empty ;
14
14
15
- public string CreatedAt { get ; set ; }
15
+ public string CreatedAt { get ; set ; } = string . Empty ;
16
16
17
17
private ShortenedCustomLink ( ) { }
18
18
Original file line number Diff line number Diff line change @@ -4,8 +4,8 @@ public class AddOrUpdateShortenedLinkModel
4
4
{
5
5
public int Id { get ; set ; }
6
6
7
- public string Title { get ; set ; }
7
+ public string Title { get ; set ; } = string . Empty ;
8
8
9
- public string DestinationLink { get ; set ; }
9
+ public string DestinationLink { get ; set ; } = string . Empty ;
10
10
}
11
11
}
Original file line number Diff line number Diff line change 97
97
app . UseSwagger ( ) ;
98
98
app . UseSwaggerUI ( o =>
99
99
{
100
- // TODO: Remover /swagger para acessar o SWAGGER
100
+ // Mantido SWAGGER em /swagger, existe rota usando /{code}
101
101
o . RoutePrefix = "swagger" ;
102
102
o . SwaggerEndpoint ( "/swagger/v1/swagger.json" , "DevEncurtaUrl.API v1" ) ;
103
103
} ) ;
You can’t perform that action at this time.
0 commit comments