feat(public/openapi): add OpenAPI v3 specifications for admin/federation/analytics and errors routes

Co-authored-by: aider (ollama/qwen2.5-coder:7b) <aider@aider.chat>
This commit is contained in:
Julian Lam
2026-04-09 15:29:20 -04:00
parent 080aac5114
commit 7f81b54112
2 changed files with 68 additions and 0 deletions

View File

@@ -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

View File

@@ -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