diff --git a/src/BUTR.CrashReport.Server/Controllers/ReportController.cs b/src/BUTR.CrashReport.Server/Controllers/ReportController.cs index 9ea7827..a8a8258 100644 --- a/src/BUTR.CrashReport.Server/Controllers/ReportController.cs +++ b/src/BUTR.CrashReport.Server/Controllers/ReportController.cs @@ -56,12 +56,12 @@ public ReportController(ILogger logger, IOptionsSnapshot GetJson(string filename, CancellationToken ct) [AllowAnonymous] [HttpGet("{filename}.html")] [ProducesResponseType(typeof(void), StatusCodes.Status200OK, "text/html")] + [ProducesResponseType(typeof(void), StatusCodes.Status400BadRequest, "application/problem+json")] [ProducesResponseType(typeof(void), StatusCodes.Status404NotFound, "application/problem+json")] [ProducesResponseType(typeof(void), StatusCodes.Status500InternalServerError, "application/problem+json")] public Task ReportHtml(string filename, CancellationToken ct) => GetHtml(filename, ct); @@ -103,6 +104,7 @@ private async Task GetJson(string filename, CancellationToken ct) [AllowAnonymous] [HttpGet("{filename}.json")] [ProducesResponseType(typeof(void), StatusCodes.Status200OK, "application/json")] + [ProducesResponseType(typeof(void), StatusCodes.Status400BadRequest, "application/problem+json")] [ProducesResponseType(typeof(void), StatusCodes.Status404NotFound, "application/problem+json")] [ProducesResponseType(typeof(void), StatusCodes.Status500InternalServerError, "application/problem+json")] public Task ReportJson(string filename, CancellationToken ct) => GetJson(filename, ct); @@ -110,6 +112,7 @@ private async Task GetJson(string filename, CancellationToken ct) [AllowAnonymous] [HttpGet("{filename}")] [ProducesResponseType(typeof(void), StatusCodes.Status200OK, "application/json")] + [ProducesResponseType(typeof(void), StatusCodes.Status400BadRequest, "application/problem+json")] [ProducesResponseType(typeof(void), StatusCodes.Status404NotFound, "application/problem+json")] [ProducesResponseType(typeof(void), StatusCodes.Status500InternalServerError, "application/problem+json")] public Task ReportBasedOnAccept(string filename, CancellationToken ct) => Request.Headers.Accept.FirstOrDefault(x => x is "text/html" or "application/json") switch