web: relativní cesta k OpenAPI dokumentu po sloučení s verzováním API
This commit is contained in:
1 parent
1550c0343b
commit
0865831746
1 file changed
+2
-1
@@ -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>
|
||||
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)
|
||||
{
|
||||
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);
|
||||
return await response.Content.ReadAsStringAsync(ct);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user