Document file download responses in OpenAPI

This commit is contained in:
biss committed 2026-11-14 13:58:55 +08:00
1 parent 3890ef139b
commit cbe33d33f2
26 files changed
+55

No files matched your search

@@ -85,6 +85,7 @@ public sealed partial class AppUpdatesController(AppDbContext db) : ControllerBa
[AllowAnonymous]
[EnableRateLimiting("app-updates")]
[HttpGet("releases/{id:guid}/bundle")]
[ProducesResponseType<FileContentResult>(StatusCodes.Status200OK, "application/zip")]
public async Task<IActionResult> DownloadBundle(
Guid id,
CancellationToken cancellationToken)
@@ -588,6 +588,7 @@ public sealed class AttendanceController(
[HttpGet("sheets/{id:guid}/export.xlsx")]
[Authorize(Roles = AttendanceRoles)]
[ProducesResponseType<FileContentResult>(StatusCodes.Status200OK, ExcelWorkbookHelper.ContentType)]
public async Task<ActionResult> Export(Guid id, CancellationToken cancellationToken)
{
var scope = currentUserDataScope.Current;
@@ -656,6 +657,7 @@ public sealed class AttendanceController(
[HttpGet("tasks/{teachingTaskId:guid}/statistics.xlsx")]
[Authorize(Roles = AttendanceRoles)]
[ProducesResponseType<FileContentResult>(StatusCodes.Status200OK, ExcelWorkbookHelper.ContentType)]
public async Task<ActionResult> ExportTaskStatistics(
Guid teachingTaskId,
CancellationToken cancellationToken)
@@ -33,6 +33,7 @@ public sealed class BaseDataExcelController(AppDbContext db, IAppCache cache) :
};
[HttpGet("{kind}/template")]
[ProducesResponseType<FileContentResult>(StatusCodes.Status200OK, ExcelWorkbookHelper.ContentType)]
public IActionResult DownloadTemplate(string kind)
{
if (!TryGetHeaders(kind, out var headers)) return NotFound();
@@ -51,6 +52,7 @@ public sealed class BaseDataExcelController(AppDbContext db, IAppCache cache) :
}
[HttpGet("{kind}/export")]
[ProducesResponseType<FileContentResult>(StatusCodes.Status200OK, ExcelWorkbookHelper.ContentType)]
public async Task<IActionResult> Export(
string kind,
CancellationToken cancellationToken,
Loaded 3 of 26 files, more files were not shown because too many files have changed in this diff. Show more