Skip to content

Commit

Permalink
Add type number to general response schema (#340)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
hsynlms authored Dec 10, 2023
1 parent aa9c0da commit 3cd52b4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/server/schemas/sharedApiSchemas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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())]),
),
});

Expand Down

0 comments on commit 3cd52b4

Please sign in to comment.