Skip to content

Commit

Permalink
Updated to trigger package deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
FrostyApeOne committed Sep 18, 2024
1 parent 62c3e03 commit 02f8b9f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions Dfe.PersonsApi.Client/Generated/Client.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ public virtual async System.Threading.Tasks.Task<MemberOfParliament> GetMemberOf
if (status_ == 400)
{
string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
throw new PersonsApiException("Constituency cannot be null or empty.", status_, responseText_, headers_, null);
throw new PersonsApiException("Constituency cannot be null or empty", status_, responseText_, headers_, null);
}
else
{
Expand Down Expand Up @@ -252,7 +252,7 @@ public virtual async System.Threading.Tasks.Task<MemberOfParliament> GetMemberOf
if (status_ == 400)
{
string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
throw new PersonsApiException("Constituency names cannot be null or empty.", status_, responseText_, headers_, null);
throw new PersonsApiException("Constituency names cannot be null or empty", status_, responseText_, headers_, null);
}
else
{
Expand Down
4 changes: 2 additions & 2 deletions Dfe.PersonsApi.Client/Generated/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"description": "Constituency not found."
},
"400": {
"description": "Constituency cannot be null or empty."
"description": "Constituency cannot be null or empty"
}
}
}
Expand Down Expand Up @@ -80,7 +80,7 @@
}
},
"400": {
"description": "Constituency names cannot be null or empty."
"description": "Constituency names cannot be null or empty"
}
}
}
Expand Down
8 changes: 4 additions & 4 deletions PersonsApi/Controllers/ConstituenciesController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ namespace PersonsApi.Controllers
public class ConstituenciesController(ISender sender) : ControllerBase
{
/// <summary>
/// Retrieve Member of Parliament by constituency name
/// Retrieve Member of Parliament by constituency name
/// </summary>
/// <param name="constituencyName">The constituency name.</param>
/// <param name="cancellationToken">The cancellation token.</param>
[HttpGet("{constituencyName}/mp")]
[SwaggerResponse(200, "A Person object representing the Member of Parliament.", typeof(MemberOfParliament))]
[SwaggerResponse(404, "Constituency not found.")]
[SwaggerResponse(400, "Constituency cannot be null or empty.")]
[SwaggerResponse(400, "Constituency cannot be null or empty")]
public async Task<IActionResult> GetMemberOfParliamentByConstituencyAsync([FromRoute] string constituencyName, CancellationToken cancellationToken)
{
var result = await sender.Send(new GetMemberOfParliamentByConstituencyQuery(constituencyName), cancellationToken);
Expand All @@ -31,13 +31,13 @@ public async Task<IActionResult> GetMemberOfParliamentByConstituencyAsync([FromR
}

/// <summary>
/// Retrieve a collection of Member of Parliament by a collection of constituency names
/// Retrieve a collection of Member of Parliament by a collection of constituency names
/// </summary>
/// <param name="request">The request.</param>
/// <param name="cancellationToken">The cancellation token.</param>
[HttpPost("mps")]
[SwaggerResponse(200, "A collection of MemberOfParliament objects.", typeof(IEnumerable<MemberOfParliament>))]
[SwaggerResponse(400, "Constituency names cannot be null or empty.")]
[SwaggerResponse(400, "Constituency names cannot be null or empty")]
public async Task<IActionResult> GetMembersOfParliamentByConstituenciesAsync([FromBody] GetMembersOfParliamentByConstituenciesQuery request, CancellationToken cancellationToken)
{
var result = await sender.Send(request, cancellationToken);
Expand Down

0 comments on commit 02f8b9f

Please sign in to comment.