mirror of
https://github.com/C9Glax/tranga.git
synced 2025-09-10 11:58:19 +02:00
Descriptions for Records and DTOs
This commit is contained in:
37
API/Controllers/Requests/CreateLibraryConnectorRecord.cs
Normal file
37
API/Controllers/Requests/CreateLibraryConnectorRecord.cs
Normal file
@@ -0,0 +1,37 @@
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using API.Schema.LibraryContext.LibraryConnectors;
|
||||
|
||||
namespace API.Controllers.Requests;
|
||||
|
||||
public sealed record CreateLibraryConnectorRecord(LibraryType LibraryType, string Url, string Username, string Password)
|
||||
{
|
||||
/// <summary>
|
||||
/// The <see cref="LibraryType"/>
|
||||
/// </summary>
|
||||
[Required]
|
||||
[Description("The Library Type")]
|
||||
public LibraryType LibraryType { get; init; } = LibraryType;
|
||||
|
||||
/// <summary>
|
||||
/// The Url of the Library instance
|
||||
/// </summary>
|
||||
[Required]
|
||||
[Url]
|
||||
[Description("The Url of the Library instance")]
|
||||
public string Url { get; init; } = Url;
|
||||
|
||||
/// <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;
|
||||
|
||||
/// <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;
|
||||
}
|
21
API/Controllers/Requests/CreateLibraryRecord.cs
Normal file
21
API/Controllers/Requests/CreateLibraryRecord.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace API.Controllers.Requests;
|
||||
|
||||
public sealed record CreateLibraryRecord(string BasePath, string LibraryName)
|
||||
{
|
||||
/// <summary>
|
||||
/// The directory Path of the library
|
||||
/// </summary>
|
||||
[Required]
|
||||
[Description("The directory Path of the library")]
|
||||
public string BasePath { get; init; } = BasePath;
|
||||
|
||||
/// <summary>
|
||||
/// The Name of the library
|
||||
/// </summary>
|
||||
[Required]
|
||||
[Description("The Name of the library")]
|
||||
public string LibraryName { get; init; } = LibraryName;
|
||||
}
|
Reference in New Issue
Block a user