diff --git a/tests/unit_test/test_v1_ghost_guard.py b/tests/unit_test/test_v1_ghost_guard.py index 0ad6a9de6..999313ace 100644 --- a/tests/unit_test/test_v1_ghost_guard.py +++ b/tests/unit_test/test_v1_ghost_guard.py @@ -7,8 +7,8 @@ Phase 8 task #44 (H3) cleaned the provider-aware Hurl suite to use ``/api/v2/providers/*`` so it no longer hits dead v1 provider CRUD routes. -A few other domains (apikeys, audit, marketplace, settings, prompts, chat -ops, export, document upload variants) still legitimately live at +A few other domains (apikeys, audit, marketplace, prompts, chat ops, export, +document upload variants) still legitimately live at ``/api/v1`` until tasks #50–#52 / #47–#49 land. Those paths are listed in ``TRANSITIONAL_V1_PREFIXES`` below and each follow-up PR is expected to shrink the set as it migrates the corresponding domain to ``/api/v2``. @@ -36,7 +36,7 @@ # Transitional prefixes — these v1 routes are still mounted in main and used # by e2e Hurl as long as the corresponding G* migration tasks have not landed. # Each follow-up PR (G4a audit / G4b apikeys / G4c marketplace / G3 prompts / -# G1 export / G2 settings / G4d chat ops) is expected to remove the matching +# G1 export / G4d chat ops) is expected to remove the matching # entry from this set together with its Hurl rewrite. # # Anything outside both sets is an unrecognised v1 reference and must be @@ -47,7 +47,6 @@ "/api/v1/audit-logs", # G4a → /api/v2/audit-logs "/api/v1/marketplace", # G4c → /api/v2/marketplace "/api/v1/prompts", # G3 → /api/v2/prompts - "/api/v1/settings", # G2 → /api/v2/settings "/api/v1/collections", # G1 (export) + G5 (document upload variants) "/api/v1/export-tasks", # G1 → /api/v2/export-tasks "/api/v1/chats", # G4d → /api/v2/chats diff --git a/web/src/api-v2/schema.d.ts b/web/src/api-v2/schema.d.ts index 2af0ff0a0..84df3ad25 100644 --- a/web/src/api-v2/schema.d.ts +++ b/web/src/api-v2/schema.d.ts @@ -863,7 +863,7 @@ export interface paths { patch?: never; trace?: never; }; - "/api/v1/settings": { + "/api/v2/settings": { parameters: { query?: never; header?: never; @@ -881,7 +881,7 @@ export interface paths { patch?: never; trace?: never; }; - "/api/v1/settings/parser_health": { + "/api/v2/settings/parser_health": { parameters: { query?: never; header?: never; @@ -898,7 +898,7 @@ export interface paths { patch?: never; trace?: never; }; - "/api/v1/settings/test_mineru_token": { + "/api/v2/settings/test_mineru_token": { parameters: { query?: never; header?: never; diff --git a/web/src/app/admin/configuration/parser-settings.tsx b/web/src/app/admin/configuration/parser-settings.tsx index b093bc46d..ef1df80aa 100644 --- a/web/src/app/admin/configuration/parser-settings.tsx +++ b/web/src/app/admin/configuration/parser-settings.tsx @@ -105,7 +105,7 @@ export const ParserSettings = ({ setHealthLoading(true); try { const response = await fetch( - `${process.env.NEXT_PUBLIC_BASE_PATH || ''}/api/v1/settings/parser_health`, + `${process.env.NEXT_PUBLIC_BASE_PATH || ''}/api/v2/settings/parser_health`, { credentials: 'include', cache: 'no-store', diff --git a/web/src/features/admin/client-api.ts b/web/src/features/admin/client-api.ts index 6b1066b4d..037619fcb 100644 --- a/web/src/features/admin/client-api.ts +++ b/web/src/features/admin/client-api.ts @@ -19,7 +19,7 @@ import type { // kept separate per design-lock msg=5f0a370b decision 2e. export async function updateSettings(input: Settings): Promise { - const { data } = await browserApiClient.PUT('/api/v1/settings', { + const { data } = await browserApiClient.PUT('/api/v2/settings', { body: input, }); if (!data) { @@ -37,7 +37,7 @@ export async function testMineruToken( token: string, ): Promise { const { data } = await browserApiClient.POST( - '/api/v1/settings/test_mineru_token', + '/api/v2/settings/test_mineru_token', { body: { token }, }, diff --git a/web/src/features/admin/server-api.ts b/web/src/features/admin/server-api.ts index 06b60fc0b..d3a35e9fc 100644 --- a/web/src/features/admin/server-api.ts +++ b/web/src/features/admin/server-api.ts @@ -9,7 +9,7 @@ import type { Settings, SystemDefaultQuotasResponse } from './types'; export async function getSettings(): Promise { const client = await createServerApiClient(); - const { data } = await client.GET('/api/v1/settings', {}); + const { data } = await client.GET('/api/v2/settings', {}); return data ?? null; }