Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Adapt reference for /health to the latest refactoring #10

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions api-spec/healthapi.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
2 changes: 1 addition & 1 deletion api-spec/openapi.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
openapi: 3.0.3
openapi: 3.1.0
info:
title: Waku V2 node REST API
version: 1.0.0
Expand Down
23 changes: 23 additions & 0 deletions api-spec/schemas/apitypes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'