web: relativní cesta k OpenAPI dokumentu po sloučení s verzováním API

This commit is contained in:
PatTheEvil committed 2026-12-04 15:47:25 +01:00
1 parent 1550c0343b
commit 0865831746
1 file changed
+2 -1
+2 -1
View File
@@ -8,9 +8,10 @@ namespace Helpdesk.Web.Api;
/// <summary>Endpointy API pro přihlášeného uživatele; access token přidává <see cref="BearerTokenHandler"/>.</summary> /// <summary>Endpointy API pro přihlášeného uživatele; access token přidává <see cref="BearerTokenHandler"/>.</summary>
public sealed class HelpdeskApiClient(HttpClient http) public sealed class HelpdeskApiClient(HttpClient http)
{ {
/// <summary>OpenAPI dokument pro Swagger UI (jen admin). Cesta je relativní – verzi API přidává základní adresa.</summary>
public async Task<string> GetOpenApiAsync(CancellationToken ct) public async Task<string> GetOpenApiAsync(CancellationToken ct)
{ {
using var response = await http.GetAsync("api/v1/admin/openapi/v1.json", ct); using var response = await http.GetAsync("admin/openapi/v1.json", ct);
await ApiResponse.EnsureSuccessAsync(response, ct); await ApiResponse.EnsureSuccessAsync(response, ct);
return await response.Content.ReadAsStringAsync(ct); return await response.Content.ReadAsStringAsync(ct);
} }