Skip to content

Commit d65f613

Browse files
Merge pull request #52 from TransactionProcessing/documentation/#47_swaggerpages
Minor swagger updates
2 parents 8ee72c0 + fd38421 commit d65f613

File tree

8 files changed

+506
-12
lines changed

8 files changed

+506
-12
lines changed

MessagingService.DataTransferObjects/MessagingService.DataTransferObjects.csproj

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
44
<TargetFrameworks>net5.0;netstandard2.0</TargetFrameworks>
55
</PropertyGroup>
66

7+
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net5.0|AnyCPU'">
8+
<DocumentationFile>D:\Projects\StuartFerguson\Messaging\MessagingService.DataTransferObjects\MessagingService.DataTransferObjects.xml</DocumentationFile>
9+
</PropertyGroup>
10+
711
<ItemGroup>
812
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
913
</ItemGroup>

MessagingService.DataTransferObjects/MessagingService.DataTransferObjects.xml

Lines changed: 125 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

MessagingService/Controllers/DomainEventController.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
[Route(DomainEventController.ControllerRoute)]
2323
[ApiController]
2424
[ExcludeFromCodeCoverage]
25+
[ApiExplorerSettings(IgnoreApi = true)]
2526
public class DomainEventController : ControllerBase
2627
{
2728
#region Fields

MessagingService/Controllers/EmailController.cs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,19 +49,17 @@ public EmailController(IMediator mediator)
4949
#endregion
5050

5151
#region Methods
52-
52+
5353
/// <summary>
54-
/// Posts the email.
54+
/// Sends the email.
5555
/// </summary>
5656
/// <param name="sendEmailRequest">The send email request.</param>
5757
/// <param name="cancellationToken">The cancellation token.</param>
5858
/// <returns></returns>
5959
[HttpPost]
6060
[Route("")]
61-
[SwaggerResponse(201, "Created", typeof(SendEmailResponseDTO))]
62-
[SwaggerResponseExample(201, typeof(SendEmailResponseExample))]
63-
64-
public async Task<IActionResult> PostEmail([FromBody] SendEmailRequestDTO sendEmailRequest,
61+
[ProducesResponseType(typeof(SendEmailResponseDTO), 201)]
62+
public async Task<IActionResult> SendEmail([FromBody] SendEmailRequestDTO sendEmailRequest,
6563
CancellationToken cancellationToken)
6664
{
6765
// Reject password tokens

MessagingService/Controllers/SMSController.cs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,18 +42,17 @@ public SMSController(IMediator mediator)
4242
#endregion
4343

4444
#region Methods
45-
45+
4646
/// <summary>
47-
/// Posts the sms.
47+
/// Sends the SMS.
4848
/// </summary>
4949
/// <param name="sendSMSRequest">The send SMS request.</param>
5050
/// <param name="cancellationToken">The cancellation token.</param>
5151
/// <returns></returns>
5252
[HttpPost]
5353
[Route("")]
54-
[SwaggerResponse(201, "Created", typeof(SendSMSResponse))]
55-
[SwaggerResponseExample(201, typeof(SendSMSResponseExample))]
56-
public async Task<IActionResult> PostSMS([FromBody] SendSMSRequest sendSMSRequest,
54+
[ProducesResponseType(typeof(SendSMSResponse), 201)]
55+
public async Task<IActionResult> SendSMS([FromBody] SendSMSRequest sendSMSRequest,
5756
CancellationToken cancellationToken)
5857
{
5958
// Reject password tokens

MessagingService/MessagingService.csproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
66
</PropertyGroup>
77

8+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
9+
<DocumentationFile>D:\Projects\StuartFerguson\Messaging\MessagingService\MessagingService.xml</DocumentationFile>
10+
</PropertyGroup>
11+
812
<ItemGroup>
913
<PackageReference Include="AspNetCore.HealthChecks.UI.Client" Version="5.0.1" />
1014
<PackageReference Include="AspNetCore.HealthChecks.Uris" Version="5.0.1" />

0 commit comments

Comments
 (0)