update swagger implementation

This commit is contained in:
voltsrage
2026-06-26 04:22:47 +08:00
parent 869006e5e7
commit 9777a335c5
8 changed files with 126 additions and 36 deletions
@@ -0,0 +1,8 @@
/// <summary>Paginated batch list returned by GET /api/v1/digitization-batches.</summary>
public record BatchListResponse(
IReadOnlyList<BatchDetailResponse> Items,
int Page,
int PageSize,
int TotalCount,
int TotalPages
);
@@ -0,0 +1,24 @@
using System.ComponentModel.DataAnnotations;
/// <summary>
/// Multipart form for batch creation. Combines the uploaded scan with batch metadata
/// so Swagger documents a single <c>multipart/form-data</c> request.
/// </summary>
public class CreateBatchForm
{
/// <summary>PDF, JPEG, or PNG scan (max 25 MB).</summary>
[Required]
public IFormFile File { get; set; } = null!;
/// <summary>Batch type literal, e.g. PATIENT_REGISTRATION or ENCOUNTER_SUMMARY.</summary>
[Required]
public string BatchType { get; set; } = null!;
/// <summary>BACKFILL (default) or LIVE_CAPTURE.</summary>
public string? Track { get; set; }
/// <summary>Optional patient link used for duplicate-document detection.</summary>
public Guid? PatientId { get; set; }
public CreateBatchRequest ToMetadata() => new(BatchType, Track, PatientId);
}