ASP.NET infers [Required] for non-nullable reference-type query parameters even when initialized with "", so an empty path= query failed binding with 'The Path field is required.' Making the property nullable removes the implicit required constraint; both browse endpoints already normalize with Path ?? "". Refs #180
20 lines
708 B
C#
20 lines
708 B
C#
namespace Butter.Dtos.Asset;
|
|
|
|
/// <summary>
|
|
/// Represents the parameters for browsing assets within a folder at a specific directory level.
|
|
/// </summary>
|
|
public class AssetBrowseOptionsDto : PagedSearchParametersDto {
|
|
/// <summary>
|
|
/// Gets or sets the root folder ID to browse within.
|
|
/// </summary>
|
|
public Guid FolderId { get; set; }
|
|
/// <summary>
|
|
/// Gets or sets the current path relative to the folder root (empty or null for root).
|
|
/// </summary>
|
|
public string? Path { get; set; }
|
|
/// <summary>
|
|
/// Gets or sets whether to only include assets not assigned to any album. Defaults to true.
|
|
/// </summary>
|
|
public bool UnlinkedOnly { get; set; } = true;
|
|
}
|