Skip to content

Commit f4eefcb

Browse files
committed
fix: accept both string and number types for limit parameter
- Change limit schema type from 'number' to ['number', 'string'] - Fixes 400 error when n8n sends limit as string (e.g. "50" instead of 50) - Service layer already converts with Number() for safety
1 parent 3c1ff61 commit f4eefcb

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/validate/business.schema.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export const catalogSchema: JSONSchema7 = {
44
type: 'object',
55
properties: {
66
number: { type: 'string' },
7-
limit: { type: 'number' },
7+
limit: { type: ['number', 'string'] },
88
cursor: { type: 'string' },
99
},
1010
};
@@ -13,7 +13,7 @@ export const collectionsSchema: JSONSchema7 = {
1313
type: 'object',
1414
properties: {
1515
number: { type: 'string' },
16-
limit: { type: 'number' },
16+
limit: { type: ['number', 'string'] },
1717
cursor: { type: 'string' },
1818
},
1919
};

0 commit comments

Comments
 (0)