Improves OpenApi documentation

This commit is contained in:
BinaryAlley committed 2024-11-15 21:01:19 +02:00
1 parent f2703b86c5
commit 77f95708b9
101 files changed
+2336 -294

No files matched your search

@@ -7,9 +7,9 @@ namespace Lumina.Contracts.DTO.Common;
/// <summary>
/// Data transfer object for language information.
/// </summary>
/// <param name="LanguageCode">Gets the ISO code of the language (e.g., "en" for English).</param>
/// <param name="LanguageName">Gets the name of the language in English.</param>
/// <param name="NativeName">Gets the native name of the language (e.g., "Español" for Spanish).</param>
/// <param name="LanguageCode">Gets the ISO code of the language (e.g., "en" for English). Required.</param>
/// <param name="LanguageName">Gets the name of the language in English. Required.</param>
/// <param name="NativeName">Gets the native name of the language (e.g., "Español" for Spanish). Optional.</param>
[DebuggerDisplay("LanguageName: {LanguageName}")]
public record LanguageInfoDto(
string? LanguageCode,
@@ -8,12 +8,12 @@ namespace Lumina.Contracts.DTO.Common;
/// <summary>
/// Data transfer object for a release information.
/// </summary>
/// <param name="OriginalReleaseDate">Gets the original release date of the content.</param>
/// <param name="OriginalReleaseYear">Gets the original release year of the content.</param>
/// <param name="ReReleaseDate">Gets the re-release date of the content, if applicable.</param>
/// <param name="ReReleaseYear">Gets the re-release year of the content, if applicable.</param>
/// <param name="ReleaseCountry">Gets the country where the content was released.</param>
/// <param name="ReleaseVersion">Gets the version or edition of the content's release.</param>
/// <param name="OriginalReleaseDate">Gets the original release date of the content. Optional.</param>
/// <param name="OriginalReleaseYear">Gets the original release year of the content. Optional.</param>
/// <param name="ReReleaseDate">Gets the re-release date of the content. Optional.</param>
/// <param name="ReReleaseYear">Gets the re-release year of the content. Optional.</param>
/// <param name="ReleaseCountry">Gets the country where the content was released. Optional.</param>
/// <param name="ReleaseVersion">Gets the version or edition of the content's release. Optional.</param>
[DebuggerDisplay("OriginalReleaseDate: {OriginalReleaseDate}")]
public record ReleaseInfoDto(
DateOnly? OriginalReleaseDate,
@@ -9,16 +9,16 @@ namespace Lumina.Contracts.DTO.MediaLibrary.WrittenContentLibrary;
/// <summary>
/// Data transfer object for written content metadata.
/// </summary>
/// <param name="Title">The title of the written content.</param>
/// <param name="OriginalTitle">The original title of the written content, if different from the current title.</param>
/// <param name="Description">Gets a brief description or summary of the written content.</param>
/// <param name="ReleaseInfo">The release information, including release date and other relevant details.</param>
/// <param name="Genres">The list of genres associated with the written content.</param>
/// <param name="Tags">The list of tags that further describe or categorize the written content.</param>
/// <param name="Language">The language in which the written content is written.</param>
/// <param name="OriginalLanguage">The original language of the written content, if it has been translated.</param>
/// <param name="Publisher">The name of the publisher of the written content.</param>
/// <param name="PageCount">The number of pages in the written content.</param>
/// <param name="Title">The title of the written content. Required.</param>
/// <param name="OriginalTitle">The original title of the written content, if different from the current title. Optional.</param>
/// <param name="Description">Gets a brief description or summary of the written content. Optional.</param>
/// <param name="ReleaseInfo">The release information, including release date and other relevant details. Required.</param>
/// <param name="Genres">The list of genres associated with the written content. Required.</param>
/// <param name="Tags">The list of tags that further describe or categorize the written content. Required.</param>
/// <param name="Language">The language in which the written content is written. Optional.</param>
/// <param name="OriginalLanguage">The original language of the written content, if it has been translated. Optional.</param>
/// <param name="Publisher">The name of the publisher of the written content. Optional.</param>
/// <param name="PageCount">The number of pages in the written content. Optional.</param>
[DebuggerDisplay("Title: {Title}")]
public record WrittenContentMetadataDto(
string? Title,
@@ -13,6 +13,10 @@
<Compile Include="..\AssemblyInfo_Shared.cs" Link="Properties\AssemblyInfo_Shared.cs" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="FastEndpoints.Swagger" Version="5.31.0.6-beta" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Lumina.Domain\Lumina.Domain.csproj" />
</ItemGroup>
@@ -3,10 +3,10 @@ namespace Lumina.Contracts.Requests.Authentication;
/// <summary>
/// Represents the request model for account password change.
/// </summary>
/// <param name="CurrentPassword">The username of the account.</param>
/// <param name="CurrentPassword">The current password of the account.</param>
/// <param name="NewPassword">The new password of the account.</param>
/// <param name="NewPasswordConfirm">The confirmation of the new password of the account.</param>
/// <param name="Username">The username of the account. Required.</param>
/// <param name="CurrentPassword">The current password of the account. Required.</param>
/// <param name="NewPassword">The new password of the account. Required.</param>
/// <param name="NewPasswordConfirm">The confirmation of the new password of the account. Required.</param>
public record ChangePasswordRequest(
string? Username,
string? CurrentPassword,
@@ -7,9 +7,9 @@ namespace Lumina.Contracts.Requests.Authentication;
/// <summary>
/// Represents the request model for user authentication.
/// </summary>
/// <param name="Username">The username of the account to authenticate.</param>
/// <param name="Password">The password of the account to authenticate.</param>
/// <param name="TotpCode">The TOTP (Time-Based One-Time Password) of the account to authenticate.</param>
/// <param name="Username">The username of the account to authenticate. Required.</param>
/// <param name="Password">The password of the account to authenticate. Required.</param>
/// <param name="TotpCode">The TOTP (Time-Based One-Time Password) of the account to authenticate. Optional.</param>
[DebuggerDisplay("Username: {Username}")]
public record LoginRequest(
string? Username,
@@ -7,8 +7,8 @@ namespace Lumina.Contracts.Requests.Authentication;
/// <summary>
/// Represents the request model for account password recovery.
/// </summary>
/// <param name="Username">The username of the account for which to recover the password.</param>
/// <param name="TotpCode">The TOTP (Time-Based One-Time Password) of the account for which to recover the password.</param>
/// <param name="Username">The username of the account for which to recover the password. Required.</param>
/// <param name="TotpCode">The TOTP (Time-Based One-Time Password) of the account for which to recover the password. Required.</param>
[DebuggerDisplay("Username: {Username}")]
public record RecoverPasswordRequest(
string? Username,
@@ -7,10 +7,10 @@ namespace Lumina.Contracts.Requests.Authentication;
/// <summary>
/// Represents the request model for user registration.
/// </summary>
/// <param name="Username">The desired username for the new account.</param>
/// <param name="Password">The password for the new account.</param>
/// <param name="PasswordConfirm">The confirmation of the entered password, used to ensure consistency.</param>
/// <param name="Use2fa">Indicates whether two-factor authentication (2FA) should be enabled for the new account.</param>
/// <param name="Username">The desired username for the new account. Required.</param>
/// <param name="Password">The password for the new account. Required.</param>
/// <param name="PasswordConfirm">The confirmation of the entered password, used to ensure consistency. Required.</param>
/// <param name="Use2fa">Indicates whether two-factor authentication (2FA) should be enabled for the new account. Optional.</param>
[DebuggerDisplay("Username: {Username}")]
public record RegistrationRequest(
string? Username = null,
@@ -8,8 +8,8 @@ namespace Lumina.Contracts.Requests.FileSystemManagement.Directories;
/// <summary>
/// Represents a request to get the directories of a file system path.
/// </summary>
/// <param name="Path">The file system path for which to get the directories.</param>
/// <param name="IncludeHiddenElements">Whether to include hidden file system elements or not.</param>
/// <param name="Path">The file system path for which to get the directories. Required.</param>
/// <param name="IncludeHiddenElements">Whether to include hidden file system elements or not. Optional.</param>
[DebuggerDisplay("Path: {Path}")]
public record GetDirectoriesRequest(
string? Path,
@@ -8,9 +8,9 @@ namespace Lumina.Contracts.Requests.FileSystemManagement.Directories;
/// <summary>
/// Represents a request to get the tree of directories that make up a file system path.
/// </summary>
/// <param name="Path">The file system path for which to get the directory tree.</param>
/// <param name="IncludeFiles">Whether to include files along the directories or not.</param>
/// <param name="IncludeHiddenElements">Whether to include hidden file system elements or not.</param>
/// <param name="Path">The file system path for which to get the directory tree. Required.</param>
/// <param name="IncludeFiles">Whether to include files along the directories or not. Optional.</param>
/// <param name="IncludeHiddenElements">Whether to include hidden file system elements or not. Optional.</param>
[DebuggerDisplay("Path: {Path}")]
public record GetDirectoryTreeRequest(
string? Path,
@@ -8,8 +8,8 @@ namespace Lumina.Contracts.Requests.FileSystemManagement.Directories;
/// <summary>
/// Represents a request to get the directories of a file system path.
/// </summary>
/// <param name="Path">The file system path for which to get the directory tree.</param>
/// <param name="IncludeHiddenElements">Whether to include hidden file system elements or not.</param>
/// <param name="Path">The file system path for which to get the directory tree. Required.</param>
/// <param name="IncludeHiddenElements">Whether to include hidden file system elements or not. Optional.</param>
[DebuggerDisplay("Path: {Path}")]
public record GetTreeDirectoriesRequest(
string? Path,
@@ -8,8 +8,8 @@ namespace Lumina.Contracts.Requests.FileSystemManagement.Files;
/// <summary>
/// Represents a request to get the files at a file system path.
/// </summary>
/// <param name="Path">The file system path for which to get the files.</param>
/// <param name="IncludeHiddenElements">Whether to include hidden file system elements or not.</param>
/// <param name="Path">The file system path for which to get the files. Required.</param>
/// <param name="IncludeHiddenElements">Whether to include hidden file system elements or not. Optional.</param>
[DebuggerDisplay("Path: {Path}")]
public record GetFilesRequest(
string? Path,
@@ -8,8 +8,8 @@ namespace Lumina.Contracts.Requests.FileSystemManagement.Files;
/// <summary>
/// Represents a request to get the files of a file system path.
/// </summary>
/// <param name="Path">The file system path for which to get the tree files.</param>
/// <param name="IncludeHiddenElements">Whether to include hidden file system elements or not.</param>
/// <param name="Path">The file system path for which to get the tree files. Required.</param>
/// <param name="IncludeHiddenElements">Whether to include hidden file system elements or not. Optional.</param>
[DebuggerDisplay("Path: {Path}")]
public record GetTreeFilesRequest(
string? Path,
@@ -8,8 +8,8 @@ namespace Lumina.Contracts.Requests.FileSystemManagement.Path;
/// <summary>
/// Represents a request to check the existence of a file system path.
/// </summary>
/// <param name="Path">The file system path to check the exitence of.</param>
/// <param name="IncludeHiddenElements">Whether to include hidden elements in the search results, or not.</param>
/// <param name="Path">The file system path to check the exitence of. Required.</param>
/// <param name="IncludeHiddenElements">Whether to include hidden elements in the search results, or not. Optional.</param>
[DebuggerDisplay("Path: {Path}, IncludeHiddenElements: {IncludeHiddenElements}")]
public record CheckPathExistsRequest(
string? Path,
@@ -1,6 +1,5 @@
#region ========================================================================= USING =====================================================================================
using System.Diagnostics;
using System.Text.Json.Serialization;
#endregion
namespace Lumina.Contracts.Requests.FileSystemManagement.Path;
@@ -8,8 +7,8 @@ namespace Lumina.Contracts.Requests.FileSystemManagement.Path;
/// <summary>
/// Represents a request to get the root of a file system path.
/// </summary>
/// <param name="OriginalPath">The file system path to combine to.</param>
/// <param name="NewPath">The file system path to combine with.</param>
/// <param name="OriginalPath">The file system path to combine to. Required.</param>
/// <param name="NewPath">The file system path to combine with. Required.</param>
[DebuggerDisplay("OriginalPath: {OriginalPath}, NewPath: {NewPath}")]
public record CombinePathRequest(
string? OriginalPath,
@@ -8,7 +8,7 @@ namespace Lumina.Contracts.Requests.FileSystemManagement.Path;
/// <summary>
/// Represents a request to get the root of a file system path.
/// </summary>
/// <param name="Path">The file system path for which to get the root.</param>
/// <param name="Path">The file system path for which to get the root. Required.</param>
[DebuggerDisplay("Path: {Path}")]
public record GetPathParentRequest(
string? Path
@@ -8,7 +8,7 @@ namespace Lumina.Contracts.Requests.FileSystemManagement.Path;
/// <summary>
/// Represents a request to get the root of a file system path.
/// </summary>
/// <param name="Path">The file system path for which to get the root.</param>
/// <param name="Path">The file system path for which to get the root. Required.</param>
[DebuggerDisplay("Path: {Path}")]
public record GetPathRootRequest(
string? Path
@@ -8,7 +8,7 @@ namespace Lumina.Contracts.Requests.FileSystemManagement.Path;
/// <summary>
/// Represents a request to split a file system path.
/// </summary>
/// <param name="Path">The file system path for which to get the path segments.</param>
/// <param name="Path">The file system path for which to get the path segments. Required.</param>
[DebuggerDisplay("Path: {Path}")]
public record SplitPathRequest(
string? Path
@@ -8,7 +8,7 @@ namespace Lumina.Contracts.Requests.FileSystemManagement.Path;
/// <summary>
/// Represents a request to check the validity of a file system path.
/// </summary>
/// <param name="Path">The file system path to validate.</param>
/// <param name="Path">The file system path to validate. Required.</param>
[DebuggerDisplay("Path: {Path}")]
public record ValidatePathRequest(
string? Path
@@ -1,6 +1,5 @@
#region ========================================================================= USING =====================================================================================
using System.Diagnostics;
using System.Text.Json.Serialization;
#endregion
namespace Lumina.Contracts.Requests.FileSystemManagement.Thumbnails;
@@ -9,10 +9,10 @@ namespace Lumina.Contracts.Requests.MediaLibrary.Management;
/// <summary>
/// Represents a request to add a media library.
/// </summary>
/// <param name="UserId">The Id of the user owning the media library.</param>
/// <param name="Title">The title of the media library.</param>
/// <param name="LibraryType">The type of the media library.</param>
/// <param name="ContentLocations">The file system paths of the directories where the media library elements are located.</param>
/// <param name="UserId">The Id of the user owning the media library. Required.</param>
/// <param name="Title">The title of the media library. Required.</param>
/// <param name="LibraryType">The type of the media library. Required.</param>
/// <param name="ContentLocations">The file system paths of the directories where the media library elements are located. Required.</param>
[DebuggerDisplay("Title: {Title}")]
public record AddLibraryRequest(
Guid UserId,
@@ -12,23 +12,23 @@ namespace Lumina.Contracts.Requests.MediaLibrary.WrittenContentLibrary.BookLibra
/// <summary>
/// Represents a request to add a book.
/// </summary>
/// <param name="Metadata">Written content metadata of the book.</param>
/// <param name="Format">The format of the book (e.g., Hardcover, Paperback), if applicable.</param>
/// <param name="Edition">The edition of the book, if applicable.</param>
/// <param name="VolumeNumber">The volume or book number in the series, if applicable.</param>
/// <param name="Series">The series name, if the book is part of a series.</param>
/// <param name="ASIN">The ASIN (Amazon Standard Identification Number) of the book, if applicable.</param>
/// <param name="GoodreadsId">The Goodreads ID of the book, if applicable.</param>
/// <param name="LCCN">The Library of Congress Control Number (LCCN) of the book, if applicable.</param>
/// <param name="OCLCNumber">The OCLC Number (WorldCat identifier) of the book, if applicable.</param>
/// <param name="OpenLibraryId">The Open Library ID of the book, if applicable.</param>
/// <param name="LibraryThingId">The LibraryThing ID of the book, if applicable.</param>
/// <param name="GoogleBooksId">The Google Books ID of the book, if applicable.</param>
/// <param name="BarnesAndNobleId">The Barnes & Noble ID of the book, if applicable.</param>
/// <param name="AppleBooksId">The Apple Books ID of the book, if applicable.</param>
/// <param name="ISBNs">The list of ISBN (International Standard Book Number) of the book.</param>
/// <param name="Contributors">The list of media contributors (actors, directors, etc) starring in this book.</param>
/// <param name="Ratings">The list of ratings for this book.</param>
/// <param name="Metadata">Written content metadata of the book. Required.</param>
/// <param name="Format">The format of the book (e.g., Hardcover, Paperback). Optional.</param>
/// <param name="Edition">The edition of the book. Optional.</param>
/// <param name="VolumeNumber">The volume or book number in the series. Optional.</param>
/// <param name="Series">The series name, if the book is part of a series. Optional.</param>
/// <param name="ASIN">The ASIN (Amazon Standard Identification Number) of the book. Optional.</param>
/// <param name="GoodreadsId">The Goodreads Id of the book. Optional.</param>
/// <param name="LCCN">The Library of Congress Control Number (LCCN) of the book. Optional.</param>
/// <param name="OCLCNumber">The OCLC Number (WorldCat identifier) of the book. Optional.</param>
/// <param name="OpenLibraryId">The Open Library Id of the book. Optional.</param>
/// <param name="LibraryThingId">The LibraryThing Id of the book. Optional.</param>
/// <param name="GoogleBooksId">The Google Books Id of the book. Optional.</param>
/// <param name="BarnesAndNobleId">The Barnes & Noble Id of the book. Optional.</param>
/// <param name="AppleBooksId">The Apple Books Id of the book. Optional.</param>
/// <param name="ISBNs">The list of ISBN (International Standard Book Number) of the book. Required.</param>
/// <param name="Contributors">The list of media contributors (actors, directors, etc) starring in this book. Required.</param>
/// <param name="Ratings">The list of ratings for this book. Required.</param>
[DebuggerDisplay("Title: {Metadata.Title}")]
public record AddBookRequest(
WrittenContentMetadataDto? Metadata,