Skip to content

Commit 9f4b25b

Browse files
authored
feat: reduce warning (#2980)
* phase 1 * Phase 2 * Phase 3 * Final Phase
1 parent 5a3288c commit 9f4b25b

File tree

67 files changed

+1799
-1471
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+1799
-1471
lines changed

.github/workflows/build-and-dockerize.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
# Label used to access the service container
1414
postgres:
1515
# Docker Hub image
16-
image: postgres:17-alpine
16+
image: postgres:18-alpine
1717
ports:
1818
- 5432:5432
1919
# Provide the password for postgres

BervProject.WebApi.Boilerplate.MigrationService/Worker.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1+
namespace BervProject.WebApi.Boilerplate.MigrationService;
2+
13
using System.Diagnostics;
2-
using BervProject.WebApi.Boilerplate.EntityFramework;
4+
using EntityFramework;
35
using Microsoft.EntityFrameworkCore;
46

5-
namespace BervProject.WebApi.Boilerplate.MigrationService;
6-
77
public class Worker : BackgroundService
88
{
99
public const string ActivitySourceName = "Migrations";

BervProject.WebApi.Boilerplate.ServiceDefaults/Extensions.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
using Microsoft.Extensions.DependencyInjection;
44
using Microsoft.Extensions.Diagnostics.HealthChecks;
55
using Microsoft.Extensions.Logging;
6-
using Microsoft.Extensions.ServiceDiscovery;
76
using OpenTelemetry;
87
using OpenTelemetry.Metrics;
98
using OpenTelemetry.Trace;
Lines changed: 35 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,38 @@
1-
namespace BervProject.WebApi.Boilerplate.ConfigModel
2-
{
3-
public class AWSConfiguration
4-
{
5-
public AWSBasicConfiguration Basic { get; set; }
6-
public AWSEmailConfiguration Email { get; set; }
7-
public AWSDynamoConfiguration Dynamo { get; set; }
8-
}
9-
10-
public class AWSAuth
11-
{
12-
public string AccessKey { get; set; }
13-
public string SecretKey { get; set; }
14-
}
1+
namespace BervProject.WebApi.Boilerplate.ConfigModel;
152

16-
public class AWSBasicConfiguration
17-
{
18-
public AWSAuth Auth { get; set; }
19-
}
20-
21-
public class AWSDynamoConfiguration
22-
{
23-
public string Location { get; set; }
24-
}
3+
/// <summary>
4+
/// AWS Config
5+
/// </summary>
6+
public class AwsConfiguration
7+
{
8+
/// <summary>
9+
/// Email
10+
/// </summary>
11+
public AwsEmailConfiguration Email { get; set; }
12+
/// <summary>
13+
/// Dynamo
14+
/// </summary>
15+
public AwsDynamoConfiguration Dynamo { get; set; }
16+
}
2517

26-
public class AWSEmailConfiguration
27-
{
28-
public string Location { get; set; }
29-
}
18+
/// <summary>
19+
/// AWS Dynamo Config
20+
/// </summary>
21+
public class AwsDynamoConfiguration
22+
{
23+
/// <summary>
24+
/// Location
25+
/// </summary>
26+
public string Location { get; set; }
3027
}
28+
29+
/// <summary>
30+
/// AWS Email Config
31+
/// </summary>
32+
public class AwsEmailConfiguration
33+
{
34+
/// <summary>
35+
/// Location
36+
/// </summary>
37+
public string Location { get; set; }
38+
}
Lines changed: 63 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,68 @@
1-
namespace BervProject.WebApi.Boilerplate.ConfigModel
2-
{
3-
public class AzureConfiguration
4-
{
5-
public AzureServiceBus ServiceBus { get; set; }
6-
public AzureStorage Storage { get; set; }
7-
}
1+
namespace BervProject.WebApi.Boilerplate.ConfigModel;
82

9-
public class AzureStorage
10-
{
11-
public StorageQueue Queue { get; set; }
12-
public BlobStorage Blob { get; set; }
13-
}
3+
/// <summary>
4+
/// Azure Config
5+
/// </summary>
6+
public class AzureConfiguration
7+
{
8+
/// <summary>
9+
/// Service Bus
10+
/// </summary>
11+
public AzureServiceBus ServiceBus { get; set; }
12+
/// <summary>
13+
/// Storage
14+
/// </summary>
15+
public AzureStorage Storage { get; set; }
16+
}
1417

15-
public class BlobStorage
16-
{
17-
public string ContainerName { get; set; }
18-
}
18+
/// <summary>
19+
/// Azure Storage
20+
/// </summary>
21+
public class AzureStorage
22+
{
23+
/// <summary>
24+
/// Queue
25+
/// </summary>
26+
public StorageQueue Queue { get; set; }
27+
/// <summary>
28+
/// Blob
29+
/// </summary>
30+
public BlobStorage Blob { get; set; }
31+
}
1932

20-
public class StorageQueue
21-
{
22-
public string QueueName { get; set; }
23-
}
33+
/// <summary>
34+
/// Blob
35+
/// </summary>
36+
public class BlobStorage
37+
{
38+
/// <summary>
39+
/// Container Name
40+
/// </summary>
41+
public string ContainerName { get; set; }
42+
}
2443

25-
public class AzureServiceBus
26-
{
27-
public string QueueName { get; set; }
28-
public string TopicName { get; set; }
29-
}
44+
/// <summary>
45+
/// Queue
46+
/// </summary>
47+
public class StorageQueue
48+
{
49+
/// <summary>
50+
/// Queue Name
51+
/// </summary>
52+
public string QueueName { get; set; }
3053
}
54+
55+
/// <summary>
56+
/// Service Bus
57+
/// </summary>
58+
public class AzureServiceBus
59+
{
60+
/// <summary>
61+
/// Queue Name
62+
/// </summary>
63+
public string QueueName { get; set; }
64+
/// <summary>
65+
/// Topic Name
66+
/// </summary>
67+
public string TopicName { get; set; }
68+
}

BervProject.WebApi.Boilerplate/Controllers/AWSS3Controller.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ namespace BervProject.WebApi.Boilerplate.Controllers
1111
[ApiVersion("1.0")]
1212
public class SThreeController : ControllerBase
1313
{
14-
private readonly IAWSS3Service _awsS3Service;
15-
public SThreeController(IAWSS3Service awsS3Service)
14+
private readonly IAwsS3Service _awsS3Service;
15+
public SThreeController(IAwsS3Service awsS3Service)
1616
{
1717
_awsS3Service = awsS3Service;
1818
}

BervProject.WebApi.Boilerplate/Controllers/NoteController.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
using BervProject.WebApi.Boilerplate.Services;
33
using Microsoft.AspNetCore.Mvc;
44
using System.Threading.Tasks;
5+
using BervProject.WebApi.Boilerplate.Services.Azure;
56
using Microsoft.AspNetCore.Http;
67

78
namespace BervProject.WebApi.Boilerplate.Controllers
Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,24 @@
1-
using System;
1+
namespace BervProject.WebApi.Boilerplate.Entities;
2+
3+
using System;
24
using System.ComponentModel.DataAnnotations;
35

4-
namespace BervProject.WebApi.Boilerplate.Entities
6+
/// <summary>
7+
/// Book Entity
8+
/// </summary>
9+
public class Book
510
{
6-
public class Book
7-
{
8-
public Guid Id { get; set; }
9-
[Required]
10-
public string Name { get; set; }
11-
public virtual Publisher Publisher { get; set; }
12-
}
13-
}
11+
/// <summary>
12+
/// Id
13+
/// </summary>
14+
public Guid Id { get; set; }
15+
/// <summary>
16+
/// Name
17+
/// </summary>
18+
[Required]
19+
public string Name { get; set; }
20+
/// <summary>
21+
/// Publisher
22+
/// </summary>
23+
public virtual Publisher Publisher { get; set; }
24+
}
Lines changed: 30 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,36 @@
1+
namespace BervProject.WebApi.Boilerplate.Entities;
12

23
using System;
34
using Azure;
45
using Azure.Data.Tables;
56

6-
namespace BervProject.WebApi.Boilerplate.Entities
7+
/// <summary>
8+
/// Note
9+
/// </summary>
10+
public class Note : ITableEntity
711
{
8-
public class Note : ITableEntity
9-
{
10-
public string PartitionKey { get; set; }
11-
public string RowKey { get; set; }
12-
public string Title { get; set; }
13-
public string Message { get; set; }
14-
public DateTimeOffset? Timestamp { get; set; }
15-
public ETag ETag { get; set; }
16-
}
17-
}
18-
12+
/// <summary>
13+
/// Partition Key
14+
/// </summary>
15+
public string PartitionKey { get; set; }
16+
/// <summary>
17+
/// Row key
18+
/// </summary>
19+
public string RowKey { get; set; }
20+
/// <summary>
21+
/// Title
22+
/// </summary>
23+
public string Title { get; set; }
24+
/// <summary>
25+
/// Message
26+
/// </summary>
27+
public string Message { get; set; }
28+
/// <summary>
29+
/// Timestamp
30+
/// </summary>
31+
public DateTimeOffset? Timestamp { get; set; }
32+
/// <summary>
33+
/// ETag
34+
/// </summary>
35+
public ETag ETag { get; set; }
36+
}
Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,27 @@
1-
using System;
1+
namespace BervProject.WebApi.Boilerplate.Entities;
2+
3+
using System;
24
using System.Collections.Generic;
35
using System.ComponentModel.DataAnnotations;
46
using System.Text.Json.Serialization;
57

6-
namespace BervProject.WebApi.Boilerplate.Entities
8+
/// <summary>
9+
/// Publisher
10+
/// </summary>
11+
public class Publisher
712
{
8-
public class Publisher
9-
{
10-
public Guid Id { get; set; }
11-
[Required]
12-
public string Name { get; set; }
13-
[JsonIgnore]
14-
public virtual ICollection<Book> Books { get; set; }
15-
}
16-
}
13+
/// <summary>
14+
/// Id
15+
/// </summary>
16+
public Guid Id { get; set; }
17+
/// <summary>
18+
/// Name
19+
/// </summary>
20+
[Required]
21+
public string Name { get; set; }
22+
/// <summary>
23+
/// Books
24+
/// </summary>
25+
[JsonIgnore]
26+
public virtual ICollection<Book> Books { get; set; }
27+
}

0 commit comments

Comments
 (0)