diff --git a/client/openapi-schema.json b/client/openapi-schema.json index c1edf97..e8a48e0 100644 --- a/client/openapi-schema.json +++ b/client/openapi-schema.json @@ -1249,253 +1249,6 @@ } } } - }, - "/ai-voicebot/{path}": { - "post": { - "summary": "Proxy Static", - "operationId": "proxy_static_ai_voicebot__path__post", - "parameters": [ - { - "name": "path", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Path" - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - }, - "patch": { - "summary": "Proxy Static", - "operationId": "proxy_static_ai_voicebot__path__post", - "parameters": [ - { - "name": "path", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Path" - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - }, - "delete": { - "summary": "Proxy Static", - "operationId": "proxy_static_ai_voicebot__path__post", - "parameters": [ - { - "name": "path", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Path" - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - }, - "head": { - "summary": "Proxy Static", - "operationId": "proxy_static_ai_voicebot__path__post", - "parameters": [ - { - "name": "path", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Path" - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - }, - "put": { - "summary": "Proxy Static", - "operationId": "proxy_static_ai_voicebot__path__post", - "parameters": [ - { - "name": "path", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Path" - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - }, - "options": { - "summary": "Proxy Static", - "operationId": "proxy_static_ai_voicebot__path__post", - "parameters": [ - { - "name": "path", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Path" - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - }, - "get": { - "summary": "Proxy Static", - "operationId": "proxy_static_ai_voicebot__path__post", - "parameters": [ - { - "name": "path", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Path" - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } } }, "components": { diff --git a/client/src/api-client.ts b/client/src/api-client.ts index 0fd9ea9..ece6595 100644 --- a/client/src/api-client.ts +++ b/client/src/api-client.ts @@ -276,34 +276,6 @@ export class ApiClient { async getExportMetricsPrometheus(): Promise { return this.request(this.getApiPath(`/ai-voicebot/api/metrics/export`), { method: "GET" }); } - - async createProxyStatic(path: string): Promise { - return this.request(this.getApiPath(`/ai-voicebot/${path}`), { method: "POST" }); - } - - async updateProxyStatic(path: string): Promise { - return this.request(this.getApiPath(`/ai-voicebot/${path}`), { method: "PATCH" }); - } - - async deleteProxyStatic(path: string): Promise { - return this.request(this.getApiPath(`/ai-voicebot/${path}`), { method: "DELETE" }); - } - - async headProxyStatic(path: string): Promise { - return this.request(this.getApiPath(`/ai-voicebot/${path}`), { method: "HEAD" }); - } - - async replaceProxyStatic(path: string): Promise { - return this.request(this.getApiPath(`/ai-voicebot/${path}`), { method: "PUT" }); - } - - async optionsProxyStatic(path: string): Promise { - return this.request(this.getApiPath(`/ai-voicebot/${path}`), { method: "OPTIONS" }); - } - - async getProxyStatic(path: string): Promise { - return this.request(this.getApiPath(`/ai-voicebot/${path}`), { method: "GET" }); - } } // Default client instance diff --git a/client/src/api-evolution-checker.ts b/client/src/api-evolution-checker.ts index ad4d74e..841b541 100644 --- a/client/src/api-evolution-checker.ts +++ b/client/src/api-evolution-checker.ts @@ -7,7 +7,6 @@ export const knownEndpoints = new Set([ `DELETE:${base}/api/bots/config/lobby/{lobby_id}`, `DELETE:${base}/api/bots/config/lobby/{lobby_id}/bot/{bot_name}`, `DELETE:${base}/api/bots/config/schema/{bot_name}/cache`, - `DELETE:${base}/{path}`, `GET:${base}/api/admin/names`, `GET:${base}/api/admin/session_metrics`, `GET:${base}/api/admin/validate_sessions`, @@ -30,10 +29,6 @@ export const knownEndpoints = new Set([ `GET:${base}/api/session`, `GET:${base}/api/system/health`, `GET:${base}/api/system/info`, - `GET:${base}/{path}`, - `HEAD:${base}/{path}`, - `OPTIONS:${base}/{path}`, - `PATCH:${base}/{path}`, `POST:${base}/api/admin/cleanup_lobbies`, `POST:${base}/api/admin/cleanup_sessions`, `POST:${base}/api/admin/clear_password`, @@ -45,9 +40,7 @@ export const knownEndpoints = new Set([ `POST:${base}/api/bots/providers/register`, `POST:${base}/api/bots/{bot_name}/join`, `POST:${base}/api/cache/clear`, - `POST:${base}/api/lobby/{session_id}`, - `POST:${base}/{path}`, - `PUT:${base}/{path}` + `POST:${base}/api/lobby/{session_id}` ]); // Schema path for dynamic usage diff --git a/client/src/api-types.ts b/client/src/api-types.ts index 3e8eb28..8e83d95 100644 --- a/client/src/api-types.ts +++ b/client/src/api-types.ts @@ -261,22 +261,6 @@ export interface paths { */ get: operations["export_metrics_prometheus_ai_voicebot_api_metrics_export_get"]; }; - "/ai-voicebot/{path}": { - /** Proxy Static */ - get: operations["proxy_static_ai_voicebot__path__post"]; - /** Proxy Static */ - put: operations["proxy_static_ai_voicebot__path__post"]; - /** Proxy Static */ - post: operations["proxy_static_ai_voicebot__path__post"]; - /** Proxy Static */ - delete: operations["proxy_static_ai_voicebot__path__post"]; - /** Proxy Static */ - options: operations["proxy_static_ai_voicebot__path__post"]; - /** Proxy Static */ - head: operations["proxy_static_ai_voicebot__path__post"]; - /** Proxy Static */ - patch: operations["proxy_static_ai_voicebot__path__post"]; - }; } export type webhooks = Record; @@ -1576,26 +1560,4 @@ export interface operations { }; }; }; - /** Proxy Static */ - proxy_static_ai_voicebot__path__post: { - parameters: { - path: { - path: string; - }; - }; - responses: { - /** @description Successful Response */ - 200: { - content: { - "application/json": unknown; - }; - }; - /** @description Validation Error */ - 422: { - content: { - "application/json": components["schemas"]["HTTPValidationError"]; - }; - }; - }; - }; } diff --git a/server/main.py b/server/main.py index 4d345c1..557ba58 100644 --- a/server/main.py +++ b/server/main.py @@ -239,6 +239,7 @@ async def lifespan(app: FastAPI): @app.api_route( f"{public_url}{{path:path}}", methods=["GET", "POST", "PUT", "DELETE", "OPTIONS", "HEAD", "PATCH"], + include_in_schema=False, ) async def proxy_static(request: Request, path: str): # Do not proxy API or websocket paths