G: F2 reflect peer status schemas from JsonSchema derives
This commit is contained in:
1 parent
1506af11fc
commit
d2917b2483
3 files changed
+155
-184
No files matched your search
+113
-21
@@ -964,19 +964,19 @@
|
||||
"schemas": {
|
||||
"ApiStatus": {
|
||||
"type": "object",
|
||||
"description": "\"API running\": an authenticated `GET /api/v1/ping`. `up` is true also when the peer answered 401, so a revoked token reads as `auth = rejected` rather than as an outage.",
|
||||
"required": [
|
||||
"up",
|
||||
"since",
|
||||
"last_checked",
|
||||
"last_error",
|
||||
"latency_ms",
|
||||
"auth",
|
||||
"peer_version"
|
||||
"auth"
|
||||
],
|
||||
"properties": {
|
||||
"auth": {
|
||||
"$ref": "#/components/schemas/AuthState"
|
||||
"type": "string",
|
||||
"description": "State of the consolidator's credential on the peer.",
|
||||
"enum": [
|
||||
"ok",
|
||||
"rejected",
|
||||
"unknown"
|
||||
]
|
||||
},
|
||||
"last_checked": {
|
||||
"type": [
|
||||
@@ -997,6 +997,7 @@
|
||||
"integer",
|
||||
"null"
|
||||
],
|
||||
"format": "uint64",
|
||||
"minimum": 0
|
||||
},
|
||||
"peer_version": {
|
||||
@@ -1012,7 +1013,7 @@
|
||||
"null"
|
||||
],
|
||||
"format": "date-time",
|
||||
"description": "Time of the last state change; null until the first check and reset on restart."
|
||||
"description": "Last change; `None` until the first check and reset on restart."
|
||||
},
|
||||
"up": {
|
||||
"type": "boolean"
|
||||
@@ -1021,7 +1022,7 @@
|
||||
},
|
||||
"AuthState": {
|
||||
"type": "string",
|
||||
"description": "State of the consolidator's credential on the peer: `ok`, `rejected` or `unknown`.",
|
||||
"description": "`Ok` and `Rejected` refer to our credential; `Unknown` is used before the\nfirst check and for peers without the authenticated ping endpoint.",
|
||||
"enum": [
|
||||
"ok",
|
||||
"rejected",
|
||||
@@ -1360,7 +1361,7 @@
|
||||
},
|
||||
"PeerStatus": {
|
||||
"type": "object",
|
||||
"description": "One configured peer and the last result of both health checks.",
|
||||
"description": "Registry snapshot entry, serialized as-is by REST and MCP.",
|
||||
"required": [
|
||||
"name",
|
||||
"enabled",
|
||||
@@ -1370,7 +1371,63 @@
|
||||
],
|
||||
"properties": {
|
||||
"api": {
|
||||
"$ref": "#/components/schemas/ApiStatus"
|
||||
"type": "object",
|
||||
"description": "\"API running\": an authenticated `GET /api/v1/ping`.",
|
||||
"required": [
|
||||
"up",
|
||||
"auth"
|
||||
],
|
||||
"properties": {
|
||||
"auth": {
|
||||
"type": "string",
|
||||
"description": "State of the consolidator's credential on the peer.",
|
||||
"enum": [
|
||||
"ok",
|
||||
"rejected",
|
||||
"unknown"
|
||||
]
|
||||
},
|
||||
"last_checked": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
],
|
||||
"format": "date-time"
|
||||
},
|
||||
"last_error": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
],
|
||||
"description": "Failure class such as `http_500` or `token_file`; never a URL or a secret."
|
||||
},
|
||||
"latency_ms": {
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
],
|
||||
"format": "uint64",
|
||||
"minimum": 0
|
||||
},
|
||||
"peer_version": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
],
|
||||
"description": "Version the peer reported, when it has the ping route."
|
||||
},
|
||||
"since": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
],
|
||||
"format": "date-time",
|
||||
"description": "Last change; `None` until the first check and reset on restart."
|
||||
},
|
||||
"up": {
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
},
|
||||
"enabled": {
|
||||
"type": "boolean",
|
||||
@@ -1378,10 +1435,49 @@
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"description": "Configured peer name, `^[a-z0-9][a-z0-9_-]{0,31}$`."
|
||||
"description": "Configured peer name."
|
||||
},
|
||||
"server": {
|
||||
"$ref": "#/components/schemas/ServerStatus"
|
||||
"type": "object",
|
||||
"description": "\"Server up\": a TCP connect to the peer's host and port.",
|
||||
"required": [
|
||||
"up"
|
||||
],
|
||||
"properties": {
|
||||
"last_checked": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
],
|
||||
"format": "date-time"
|
||||
},
|
||||
"last_error": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
],
|
||||
"description": "Failure class such as `timeout` or `unreachable`; never a URL or a secret."
|
||||
},
|
||||
"latency_ms": {
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
],
|
||||
"format": "uint64",
|
||||
"minimum": 0
|
||||
},
|
||||
"since": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
],
|
||||
"format": "date-time",
|
||||
"description": "Last change; `None` until the first check and reset on restart."
|
||||
},
|
||||
"up": {
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
},
|
||||
"url": {
|
||||
"type": "string",
|
||||
@@ -1391,13 +1487,8 @@
|
||||
},
|
||||
"ServerStatus": {
|
||||
"type": "object",
|
||||
"description": "\"Server up\": a TCP connect to the peer's host and port.",
|
||||
"required": [
|
||||
"up",
|
||||
"since",
|
||||
"last_checked",
|
||||
"last_error",
|
||||
"latency_ms"
|
||||
"up"
|
||||
],
|
||||
"properties": {
|
||||
"last_checked": {
|
||||
@@ -1419,6 +1510,7 @@
|
||||
"integer",
|
||||
"null"
|
||||
],
|
||||
"format": "uint64",
|
||||
"minimum": 0
|
||||
},
|
||||
"since": {
|
||||
@@ -1427,7 +1519,7 @@
|
||||
"null"
|
||||
],
|
||||
"format": "date-time",
|
||||
"description": "Time of the last state change; null until the first check and reset on restart."
|
||||
"description": "Last change; `None` until the first check and reset on restart."
|
||||
},
|
||||
"up": {
|
||||
"type": "boolean"
|
||||
|
||||
Reference in new issue
Block a user