Fixes all request Records with Validations
This commit is contained in:
2025-09-17 23:59:26 +02:00
parent cf4ed8d61b
commit 55fb37d62b
7 changed files with 55 additions and 45 deletions

View File

@@ -4,14 +4,14 @@ using API.Schema.LibraryContext.LibraryConnectors;
namespace API.Controllers.Requests;
public sealed record CreateLibraryConnectorRecord(LibraryType LibraryType, string Url, string Username, string Password)
public sealed record CreateLibraryConnectorRecord
{
/// <summary>
/// The <see cref="LibraryType"/>
/// </summary>
[Required]
[Description("The Library Type")]
public LibraryType LibraryType { get; init; } = LibraryType;
public required LibraryType LibraryType { get; init; }
/// <summary>
/// The Url of the Library instance
@@ -19,19 +19,19 @@ public sealed record CreateLibraryConnectorRecord(LibraryType LibraryType, strin
[Required]
[Url]
[Description("The Url of the Library instance")]
public string Url { get; init; } = Url;
public required string Url { get; init; }
/// <summary>
/// The Username to authenticate to the Library instance
/// </summary>
[Required]
[Description("The Username to authenticate to the Library instance")]
public string Username { get; init; } = Username;
public required string Username { get; init; }
/// <summary>
/// The Password to authenticate to the Library instance
/// </summary>
[Required]
[Description("The Password to authenticate to the Library instance")]
public string Password { get; init; } = Password;
public required string Password { get; init; }
}