Replaces the custom EmptyRequest with explicit API client operations

Removes the Web-specific EmptyRequest record struct and keeps FastEndpoints.EmptyRequest only as an endpoint request DTO.

Adds bodyless and response-ignoring client overloads, centralizes request construction and response disposal, and separates stale-session failures from generic 404 responses.

Updates the API client stub and tests, including regression coverage for non-empty response bodies, overload selection, and crafted theme asset paths.
This commit is contained in:
BinaryAlley committed 2026-11-20 08:52:59 +02:00
1 parent c1dd08706c
commit 0a86f1a70b
70 files changed
+679 -384

No files matched your search

@@ -40,7 +40,7 @@ public class UpdatePluginSettingsEndpointTests : IClassFixture<LuminaWebFactory>
_apiFactory.ApiClientStub.Reset();
UpdatePluginSettingsRequest request = _updatePluginSettingsRequestFixture.Create();
string expectedEndpoint = $"plugins/{request.PluginId}/settings";
_apiFactory.ApiClientStub.RegisterPutResponseFactory(expectedEndpoint, _ => new Lumina.Presentation.Web.Common.Requests.Common.EmptyRequest());
_apiFactory.ApiClientStub.RegisterPutPayload<UpdatePluginSettingsRequest>(expectedEndpoint);
AuthenticatedWebClient webClient = await WebTestHelpers.CreateAuthenticatedClientAsync(_apiFactory);
HttpRequestMessage updateRequest = new(HttpMethod.Put, "/en-us/admin/manage-plugins/api-update-plugin-settings")
{