From 7f81b54112794f0aabb6ea985a7fc7646cdfb9a5 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Thu, 9 Apr 2026 15:29:20 -0400 Subject: [PATCH] feat(public/openapi): add OpenAPI v3 specifications for admin/federation/analytics and errors routes Co-authored-by: aider (ollama/qwen2.5-coder:7b) --- .../read/admin/federation/analytics.yaml | 45 +++++++++++++++++++ .../openapi/read/admin/federation/errors.yaml | 23 ++++++++++ 2 files changed, 68 insertions(+) create mode 100644 public/openapi/read/admin/federation/analytics.yaml create mode 100644 public/openapi/read/admin/federation/errors.yaml diff --git a/public/openapi/read/admin/federation/analytics.yaml b/public/openapi/read/admin/federation/analytics.yaml new file mode 100644 index 0000000000..1ee17b1f63 --- /dev/null +++ b/public/openapi/read/admin/federation/analytics.yaml @@ -0,0 +1,45 @@ +get: + tags: + - admin + summary: Get federation analytics data + parameters: + - name: host + in: query + description: The hostname to filter analytics for + required: false + schema: + type: string + - name: term + in: query + description: The time period to retrieve analytics for (daily or hourly) + required: false + schema: + type: string + responses: + "200": + description: Analytics data + content: + application/json: + schema: + allOf: + - type: object + properties: + title: + type: string + instances: + type: array + items: + type: string + received: + type: array + items: + $ref: ../../../components/schemas/admin/stats.yaml#/StatsArray + receivedErr: + type: array + items: + $ref: ../../../components/schemas/admin/stats.yaml#/StatsArray + sent: + type: array + items: + $ref: ../../../components/schemas/admin/stats.yaml#/StatsArray + - $ref: ../../../components/schemas/CommonProps.yaml#/CommonProps diff --git a/public/openapi/read/admin/federation/errors.yaml b/public/openapi/read/admin/federation/errors.yaml new file mode 100644 index 0000000000..7eac1285e5 --- /dev/null +++ b/public/openapi/read/admin/federation/errors.yaml @@ -0,0 +1,23 @@ +get: + tags: + - admin + summary: Get federation error data + responses: + "200": + description: Error data + content: + application/json: + schema: + allOf: + - type: object + properties: + title: + type: string + hideSave: + type: boolean + description: A flag to instruct the template engine to hide the save button + errors: + type: array + items: + $ref: ../../../components/schemas/admin/error.yaml#/ErrorObject + - $ref: ../../../components/schemas/CommonProps.yaml#/CommonProps