Files
kumomta/docs/reference/tsa-daemon.openapi.json
T
Wez Furlong 0b87c020b4 add openapi.json metadata for http api
Adds `/api-docs/openapi.json` and `/rapidoc` endpoints to both
kumod and tsa-daemon.

The former exposes the subset of the API that is expressable
in the openapi schema as a json file that can be imported into
other tools.

The latter is a single-page web app that consumes the former
to provide an interactive API explorer.
We're using rapidoc for this, because I happen to think it looks
nicest and easiest to use, and we can integrate it into the docs
fairly nicely.

Which leads in nicely to say: I've integrated a read-only version
of rapidoc into the docs, and it even detects and adjusts to the
selected light/dark mode.

The `docs/update-openapi.sh` extracts the openapi.json data from
kumod and tsa-daemon and outputs to the correct place in the docs
directory structure to enable this.

refs: https://github.com/KumoCorp/kumomta/issues/96
2023-11-21 15:30:13 -07:00

57 lines
1.4 KiB
JSON

{
"openapi": "3.0.3",
"info": {
"title": "tsa-daemon",
"description": "",
"license": {
"name": "Apache-2.0"
},
"version": "2023.11.18-8b8f5312"
},
"paths": {
"/api/admin/set_diagnostic_log_filter/v1": {
"post": {
"tags": [
"logging"
],
"summary": "Changes the diagnostic log filter dynamically.",
"description": "Changes the diagnostic log filter dynamically.\nSee <https://docs.kumomta.com/reference/kumo/set_diagnostic_log_filter/>\nfor more information on diagnostic log filters.",
"operationId": "set_diagnostic_log_filter_v1",
"requestBody": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SetDiagnosticFilterRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Diagnostic level set successfully"
}
}
}
}
},
"components": {
"schemas": {
"SetDiagnosticFilterRequest": {
"type": "object",
"required": [
"filter"
],
"properties": {
"filter": {
"type": "string",
"description": "The diagnostic filter spec to use",
"example": "kumod=trace"
}
}
}
}
}
}