From f0887f8f5b42d69187e67c7fd0f9f554568884ae Mon Sep 17 00:00:00 2001 From: Michael Geers Date: Tue, 11 Nov 2025 12:18:21 +0100 Subject: [PATCH] docs: add /system/cache (#25228) --- server/mcp/openapi.json | 39 +++++++++++++++++++++++++++++++++++++++ server/mcp/openapi.md | 6 ++++++ server/openapi.yaml | 24 ++++++++++++++++++++++++ 3 files changed, 69 insertions(+) diff --git a/server/mcp/openapi.json b/server/mcp/openapi.json index 546342414..76a6d2ba9 100644 --- a/server/mcp/openapi.json +++ b/server/mcp/openapi.json @@ -321,6 +321,22 @@ }, "description": "Success - Soc result" }, + "SuccessResult": { + "content": { + "application/json": { + "schema": { + "properties": { + "result": { + "example": "OK", + "type": "string" + } + }, + "type": "object" + } + } + }, + "description": "Success" + }, "Unauthorized": { "content": { "text/plain": { @@ -2041,6 +2057,29 @@ ] } }, + "/system/cache": { + "delete": { + "description": "Clears all cached data. This resets all cached values from tariffs, vehicle APIs, and other components that use caching.", + "operationId": "clearCache", + "responses": { + "200": { + "$ref": "#/components/responses/SuccessResult" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + } + }, + "security": [ + { + "cookieAuth": [] + } + ], + "summary": "Clear cache", + "tags": [ + "system" + ] + } + }, "/system/log": { "get": { "description": "Returns the latest log lines.", diff --git a/server/mcp/openapi.md b/server/mcp/openapi.md index 19754a67b..802589785 100644 --- a/server/mcp/openapi.md +++ b/server/mcp/openapi.md @@ -906,6 +906,12 @@ call updateSession { } ``` +## clearCache + +Clears all cached data. This resets all cached values from tariffs, vehicle APIs, and other components that use caching. + +**Tags:** system + ## getLogAreas Returns a list of all log areas (e.g. `lp-1`, `site`, `db`). diff --git a/server/openapi.yaml b/server/openapi.yaml index 296eb7a9d..a594be65f 100644 --- a/server/openapi.yaml +++ b/server/openapi.yaml @@ -891,6 +891,20 @@ paths: $ref: "#/components/schemas/LogAreas" "401": $ref: "#/components/responses/Unauthorized" + /system/cache: + delete: + operationId: clearCache + summary: Clear cache + description: "Clears all cached data. This resets all cached values from tariffs, vehicle APIs, and other components that use caching." + security: + - cookieAuth: [] + tags: + - system + responses: + "200": + $ref: "#/components/responses/SuccessResult" + "401": + $ref: "#/components/responses/Unauthorized" /system/shutdown: post: operationId: shutdownSystem @@ -1517,6 +1531,16 @@ components: type: "object" BlankResponse: description: Success - Blank response + SuccessResult: + description: Success + content: + application/json: + schema: + type: object + properties: + result: + type: string + example: "OK" EmptyResult: description: Success - Empty result content: