G: G4 document every error code and both content types per response

This commit is contained in:
ari committed 2026-10-20 15:54:13 -04:00
1 parent 34a1e1644c
commit 214e074cca
5 files changed
+82 -22

No files matched your search

+3 -1
View File
@@ -112,7 +112,9 @@ pub(crate) async fn one(
description = "Peer route below `/api/v1`, e.g. `systemd/units`"
)),
responses(
(status = 200, body = String, description = "The peer's body, with `x-slinuxm-peer`, `Content-Type` (`application/json` or `text/event-stream`) and the peer's status"),
(status = 200,
description = "The peer's body with the peer's status and `x-slinuxm-peer`; JSON, or `text/event-stream` for a follow",
content((String = "application/json"), (String = "text/event-stream"))),
(status = 400, body = ErrorBody, description = "Path or query not allowed, or a chained request (`x-slinuxm-hop`)"),
(status = 401, body = ErrorBody, description = "Missing or unknown bearer token"),
(status = 404, body = ErrorBody, description = "Unknown peer, or the peer answered 404"),