Skip to content

Commit

Permalink
Merge pull request #393 from DFE-Digital/v1-keystage-documentation
Browse files Browse the repository at this point in the history
V1 keystage documentation
  • Loading branch information
dneed-nimble authored Oct 11, 2023
2 parents 9cd1a2f + eab77ae commit cd8e035
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion TramsDataApi/Controllers/KeyStagePerformanceController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,19 @@
using System.Text.Json;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
using Swashbuckle.AspNetCore.Annotations;
using TramsDataApi.DatabaseModels;
using TramsDataApi.ResponseModels.EducationalPerformance;
using TramsDataApi.UseCases;

namespace TramsDataApi.Controllers
{
/// <summary>
/// Manages operations related to Key Stage Educational Performance.
/// </summary>
[ApiController]
[ApiVersion("1.0")]
[SwaggerTag("Key Stage Performance Data Endpoints")]
public class KeyStagePerformanceController : ControllerBase
{
private readonly IGetKeyStagePerformanceByUrn _getKeyStagePerformanceByUrn;
Expand All @@ -22,9 +27,20 @@ public KeyStagePerformanceController(
_getKeyStagePerformanceByUrn = getKeyStagePerformanceByUrn;
_logger = logger;
}


/// <summary>
/// Retrieves educational performance data for an establishment by its URN.
/// </summary>
/// <param name="urn">The URN identifier of the establishment.</param>
/// <returns>An EducationalPerformanceResponse object or NotFound if unavailable.</returns>
[HttpGet]
[Route("educationPerformance/{urn}")]
[SwaggerOperation(
Summary = "Retrieve Educational Performance by URN",
Description = "Returns educational performance data identified by URN."
)]
[SwaggerResponse(200, "Successfully found and returned the educational performance data.")]
[SwaggerResponse(404, "Educational performance data with the specified URN not found.")]
public ActionResult<EducationalPerformanceResponse> GetEducationPerformanceByUrn(string urn)
{
_logger.LogInformation($"Attempting to get Performance Data for URN {urn}");
Expand Down

0 comments on commit cd8e035

Please sign in to comment.