From 01ce13bc3b77c7db26de698671fce81ff854d4e7 Mon Sep 17 00:00:00 2001 From: Daniel Romero Date: Fri, 2 Feb 2024 12:02:29 +0100 Subject: [PATCH] fix(@nestjs/terminus): generate the correct openapi health schema When generating the openapi documents 'status' is now marked as required then when generating a typescript client using openapi-generator it translates the healthcheck response to a correct interface. Otherwise the TS2411 compilation error appears. --- lib/health-check/health-check.schema.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/health-check/health-check.schema.ts b/lib/health-check/health-check.schema.ts index f1c066e2f..443e2a498 100644 --- a/lib/health-check/health-check.schema.ts +++ b/lib/health-check/health-check.schema.ts @@ -17,6 +17,7 @@ const healthIndicatorSchema = (example: HealthIndicatorResult) => ({ example, additionalProperties: { type: 'object', + required: ['status'], properties: { status: { type: 'string',