From 3cd52b4955955466e67c83b580cca10cc5cf59ee Mon Sep 17 00:00:00 2001 From: Huseyin ELMAS Date: Sun, 10 Dec 2023 03:48:18 +0300 Subject: [PATCH] Add type number to general response schema (#340) APIs may return `number` type response. The schema only accepts if the response is type of string, object or an array. This causes internal server errors. --- src/server/schemas/sharedApiSchemas.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/schemas/sharedApiSchemas.ts b/src/server/schemas/sharedApiSchemas.ts index f0458f0a4..cf77a90fb 100644 --- a/src/server/schemas/sharedApiSchemas.ts +++ b/src/server/schemas/sharedApiSchemas.ts @@ -57,7 +57,7 @@ export const publishedDeployParamSchema = Type.Object({ */ const replyBodySchema = Type.Object({ result: Type.Optional( - Type.Union([Type.String(), Type.Object({}), Type.Array(Type.Any())]), + Type.Union([Type.Number(), Type.String(), Type.Object({}), Type.Array(Type.Any())]), ), });