From 2450e64258681d3f810f5d944309c4721bbb0925 Mon Sep 17 00:00:00 2001 From: Sanaei Date: Wed, 25 Nov 2026 17:16:25 +0330 Subject: [PATCH] docs(api): mark keepTraffic optional on the client delete endpoints Both delete routes read keepTraffic with c.Query and treat a missing value as "drop the traffic row", but the registry listed it without optional, so the OpenAPI document and every client generated from it required the parameter. --- docs/public/openapi.json | 4 ++-- frontend/public/openapi.json | 4 ++-- frontend/src/pages/api-docs/endpoints.ts | 2 ++ 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/docs/public/openapi.json b/docs/public/openapi.json index 9d86bced4..76981ff63 100644 --- a/docs/public/openapi.json +++ b/docs/public/openapi.json @@ -10121,7 +10121,7 @@ { "name": "keepTraffic", "in": "query", - "required": true, + "required": false, "description": "Pass 1 to retain the xray_client_traffic row after deletion.", "schema": { "type": "integer" @@ -10176,7 +10176,7 @@ { "name": "keepTraffic", "in": "query", - "required": true, + "required": false, "description": "Pass 1 to retain the xray_client_traffic row after deletion.", "schema": { "type": "integer" diff --git a/frontend/public/openapi.json b/frontend/public/openapi.json index 9d86bced4..76981ff63 100644 --- a/frontend/public/openapi.json +++ b/frontend/public/openapi.json @@ -10121,7 +10121,7 @@ { "name": "keepTraffic", "in": "query", - "required": true, + "required": false, "description": "Pass 1 to retain the xray_client_traffic row after deletion.", "schema": { "type": "integer" @@ -10176,7 +10176,7 @@ { "name": "keepTraffic", "in": "query", - "required": true, + "required": false, "description": "Pass 1 to retain the xray_client_traffic row after deletion.", "schema": { "type": "integer" diff --git a/frontend/src/pages/api-docs/endpoints.ts b/frontend/src/pages/api-docs/endpoints.ts index a54db2dc7..75bcb7af9 100644 --- a/frontend/src/pages/api-docs/endpoints.ts +++ b/frontend/src/pages/api-docs/endpoints.ts @@ -1342,6 +1342,7 @@ export const sections: readonly Section[] = [ in: 'query', type: 'integer', desc: 'Pass 1 to retain the xray_client_traffic row after deletion.', + optional: true, }, ], response: '{\n "success": true,\n "msg": "Client deleted"\n}', @@ -1360,6 +1361,7 @@ export const sections: readonly Section[] = [ in: 'query', type: 'integer', desc: 'Pass 1 to retain the xray_client_traffic row after deletion.', + optional: true, }, ], response: '{\n "success": true,\n "msg": "Client deleted"\n}',