Aligns the endpoint summaries with the request parameter convention

This commit is contained in:
BinaryAlley committed 2026-08-21 04:05:04 -07:00
1 parent 3da7167538
commit dcb231e393
7 files changed
+53 -8

No files matched your search

@@ -2,7 +2,6 @@
using FastEndpoints;
using Lumina.Contracts.Responses.FileSystemManagement.Common;
using Lumina.Domain.SharedKernel.Common.Enums.FileSystem;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
#endregion
@@ -12,7 +11,7 @@ namespace Lumina.Presentation.Api.Core.Endpoints.FileSystemManagement.Drives.Get
/// Class used for providing a textual description for the <see cref="GetDrivesEndpoint"/> API endpoint, for OpenAPI.
/// </summary>
[ExcludeFromCodeCoverage]
public class GetDrivesEndpointSummary : Summary<GetDrivesEndpoint>
public class GetDrivesEndpointSummary : Summary<GetDrivesEndpoint, EmptyRequest>
{
/// <summary>
/// Initializes a new instance of the <see cref="GetDrivesEndpointSummary"/> class.
@@ -11,7 +11,7 @@ namespace Lumina.Presentation.Api.Core.Endpoints.FileSystemManagement.FileSystem
/// Class used for providing a textual description for the <see cref="GetTypeEndpoint"/> API endpoint, for OpenAPI.
/// </summary>
[ExcludeFromCodeCoverage]
public class GetTypeEndpointSummary : Summary<GetTypeEndpoint, FileSystemTypeResponse>
public class GetTypeEndpointSummary : Summary<GetTypeEndpoint, EmptyRequest>
{
/// <summary>
/// Initializes a new instance of the <see cref="GetTypeEndpointSummary"/> class.
@@ -10,7 +10,7 @@ namespace Lumina.Presentation.Api.Core.Endpoints.FileSystemManagement.Path.GetPa
/// Class used for providing a textual description for the <see cref="GetPathSeparatorEndpoint"/> API endpoint, for OpenAPI.
/// </summary>
[ExcludeFromCodeCoverage]
public class GetPathSeparatorEndpointSummary : Summary<GetPathSeparatorEndpoint>
public class GetPathSeparatorEndpointSummary : Summary<GetPathSeparatorEndpoint, EmptyRequest>
{
/// <summary>
/// Initializes a new instance of the <see cref="GetPathSeparatorEndpointSummary"/> class.
@@ -1,5 +1,6 @@
#region ========================================================================= USING =====================================================================================
using FastEndpoints;
using Lumina.Contracts.Requests.MediaLibrary.Management;
using Lumina.Contracts.Responses.MediaLibrary.Management;
using System;
using System.Collections.Generic;
@@ -12,7 +13,7 @@ namespace Lumina.Presentation.Api.Core.Endpoints.Library.Management.ScanLibrary;
/// Class used for providing a textual description for the <see cref="ScanLibraryEndpoint"/> API endpoint, for OpenAPI.
/// </summary>
[ExcludeFromCodeCoverage]
public class ScanLibraryEndpointSummary : Summary<ScanLibraryEndpoint, EmptyRequest>
public class ScanLibraryEndpointSummary : Summary<ScanLibraryEndpoint, ScanLibraryRequest>
{
/// <summary>
/// Initializes a new instance of the <see cref="ScanLibraryEndpointSummary"/> class.
@@ -22,6 +23,12 @@ public class ScanLibraryEndpointSummary : Summary<ScanLibraryEndpoint, EmptyRequ
Summary = "Triggers the scan of a media library.";
Description = "Starts the scanning process of a media library of a user.";
ExampleRequest = new ScanLibraryRequest(
Id: Guid.NewGuid()
);
RequestParam(r => r.Id, "The unique identifier of the media library to be scanned. Required.");
Response(200, "The media library scan was successfully started.",
example: new MediaLibraryScanResponse(
ScanId: Guid.NewGuid(),
@@ -3,9 +3,11 @@ using FastEndpoints;
using Lumina.Contracts.DTO.Common;
using Lumina.Contracts.DTO.MediaContributors;
using Lumina.Contracts.DTO.MediaLibrary.WrittenContentLibrary.BookLibrary;
using Lumina.Contracts.Requests.MediaLibrary.WrittenContentLibrary.BookLibrary.Books;
using Lumina.Contracts.Responses.Common;
using Lumina.Contracts.Responses.MediaLibrary.WrittenContentLibrary.BookLibrary.Books;
using Lumina.Domain.SharedKernel.Common.Enums.BookLibrary;
using Lumina.Domain.SharedKernel.Common.Enums.Common;
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
@@ -17,7 +19,7 @@ namespace Lumina.Presentation.Api.Core.Endpoints.Library.WrittenContentLibrary.B
/// Class used for providing a textual description for the <see cref="GetBooksEndpoint"/> API endpoint, for OpenAPI.
/// </summary>
[ExcludeFromCodeCoverage]
public class GetBooksEndpointSummary : Summary<GetBooksEndpoint>
public class GetBooksEndpointSummary : Summary<GetBooksEndpoint, GetBooksRequest>
{
/// <summary>
/// Initializes a new instance of the <see cref="GetBooksEndpointSummary"/> class.
@@ -27,6 +29,21 @@ public class GetBooksEndpointSummary : Summary<GetBooksEndpoint>
Summary = "Retrieves the list of books.";
Description = "Returns the entire list of books.";
ExampleRequest = new GetBooksRequest(
LibraryId: Guid.NewGuid(),
CurrentPage: 1,
PerPage: 48,
SearchTerm: "fellowship",
SortBy: "title",
SortOrder: SortOrder.Ascending
);
RequestParam(r => r.LibraryId, "The Id of the media library whose books are retrieved. Required.");
RequestParam(r => r.CurrentPage, "The page of results to retrieve. Optional.");
RequestParam(r => r.PerPage, "The maximum number of books to retrieve per page. Optional.");
RequestParam(r => r.SearchTerm, "The search term used to filter results. Optional.");
RequestParam(r => r.SortBy, "The name of the field by which to sort the results. Optional.");
RequestParam(r => r.SortOrder, "The direction in which to sort the results. Optional.");
Response(200, "The paginated list of books is returned.",
example: new PaginatedResponse<BookResponse>
@@ -1,7 +1,9 @@
#region ========================================================================= USING =====================================================================================
using FastEndpoints;
using Lumina.Contracts.Requests.MediaLibrary.WrittenContentLibrary.BookLibrary.Books;
using Lumina.Contracts.Responses.Common;
using Lumina.Contracts.Responses.MediaLibrary.WrittenContentLibrary.BookLibrary.Books;
using Lumina.Domain.SharedKernel.Common.Enums.Common;
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
@@ -13,7 +15,7 @@ namespace Lumina.Presentation.Api.Core.Endpoints.Library.WrittenContentLibrary.B
/// Class used for providing a textual description for the <see cref="GetBooksLiteEndpoint"/> API endpoint, for OpenAPI.
/// </summary>
[ExcludeFromCodeCoverage]
public class GetBooksLiteEndpointSummary : Summary<GetBooksLiteEndpoint>
public class GetBooksLiteEndpointSummary : Summary<GetBooksLiteEndpoint, GetBooksLiteRequest>
{
/// <summary>
/// Initializes a new instance of the <see cref="GetBooksLiteEndpointSummary"/> class.
@@ -23,6 +25,26 @@ public class GetBooksLiteEndpointSummary : Summary<GetBooksLiteEndpoint>
Summary = "Retrieves the lightweight details of the list of books.";
Description = "Returns a paginated list of the lightweight details of the books of the media library, suitable for card-style navigation.";
ExampleRequest = new GetBooksLiteRequest(
LibraryId: Guid.NewGuid(),
CurrentPage: 1,
PerPage: 48,
SearchTerm: "fellowship",
FilterAlphaKey: "f",
IgnoreThePrefixForAlphaPicker: true,
SortBy: "title",
SortOrder: SortOrder.Ascending
);
RequestParam(r => r.LibraryId, "The Id of the media library whose books are retrieved. Required.");
RequestParam(r => r.CurrentPage, "The page of results to retrieve. Optional.");
RequestParam(r => r.PerPage, "The maximum number of books to retrieve per page. Optional.");
RequestParam(r => r.SearchTerm, "The search term used to filter results. Optional.");
RequestParam(r => r.FilterAlphaKey, "The alpha key used to filter the results by the first character of their title, for the alpha picker. Optional.");
RequestParam(r => r.IgnoreThePrefixForAlphaPicker, "Whether the leading \"The \" prefix of a title should be ignored when computing the alpha key, or not. Required.");
RequestParam(r => r.SortBy, "The name of the field by which to sort the results. Optional.");
RequestParam(r => r.SortOrder, "The direction in which to sort the results. Optional.");
Response(200, "The paginated list of lightweight book details is returned.",
example: new PaginatedResponse<BookLiteResponse>
{
@@ -10,7 +10,7 @@ namespace Lumina.Presentation.Api.Core.Endpoints.Maintenance.ApplicationSetup;
/// Class used for providing a textual description for the <see cref="CheckInitializationEndpoint"/> API endpoint, for OpenAPI.
/// </summary>
[ExcludeFromCodeCoverage]
public class CheckInitializationEndpointSummary : Summary<CheckInitializationEndpoint>
public class CheckInitializationEndpointSummary : Summary<CheckInitializationEndpoint, EmptyRequest>
{
/// <summary>
/// Initializes a new instance of the <see cref="CheckInitializationEndpointSummary"/> class.