Adapt reference for /health to the latest refactoring

...
This commit is contained in:
NagyZoltanPeter 2024-04-24 12:08:32 +02:00
parent d576ea54ca
commit 2d211cd4c2
No known key found for this signature in database
GPG Key ID: 16EADB9673B65368
3 changed files with 29 additions and 7 deletions

View File

@ -1,17 +1,16 @@
get:
summary: Get node health status
description: Retrieve readiness of a Waku v2 node.
description: Retrieve status of a Waku v2 node.
operationId: healthcheck
tags:
- health
responses:
'200':
description: Waku v2 node is up and running.
description: Health report of a Waku v2 node and its protocols.
content:
text/plain:
schema:
type: string
example: Node is healty
application/json:
schema:
$ref: "./schemas/apitypes.yaml#/HealthReport"
'500':
description: Internal server error
content:

View File

@ -1,4 +1,4 @@
openapi: 3.0.3
openapi: 3.1.0
info:
title: Waku V2 node REST API
version: 1.0.0

View File

@ -252,3 +252,26 @@ FilterSubscription:
type: string
contentTopic:
type: string
HealthStatus:
type: string
enum:
- "Initializing"
- "Synchronizing"
- "Ready"
- "Not Ready"
- "Not Mounted"
- "Shutting Down"
HealthReport:
type: object
properties:
nodeHealth:
$ref: '#/HealthStatus'
description: Overall health status of the node
protocolsHealth:
type: array
items:
type: object
additionalProperties:
$ref: '#/HealthStatus'