test refactor

This commit is contained in:
Kirill
2026-05-14 22:40:35 +05:00
parent 1de7649276
commit c5634deb51
4 changed files with 41 additions and 40 deletions
+10 -10
View File
@@ -17,13 +17,13 @@ const CREATE_PRODUCT_SCHEMA = {
slug: { type: 'string' },
categoryId: { type: 'string' },
priceCents: { type: 'number', minimum: 0 },
quantity: { type: 'number', minimum: 0 },
quantity: { type: 'number', minimum: 0, nullable: true },
inStock: { type: 'boolean' },
leadTimeDays: { type: 'number', minimum: 1 },
shortDescription: { type: 'string' },
description: { type: 'string' },
leadTimeDays: { type: 'number', minimum: 1, nullable: true },
shortDescription: { type: 'string', nullable: true },
description: { type: 'string', nullable: true },
materials: { anyOf: [{ type: 'array', items: { type: 'string' } }, { type: 'string' }] },
imageUrl: { type: 'string' },
imageUrl: { type: 'string', nullable: true },
imageUrls: { type: 'array', items: { type: 'string' } },
published: { type: 'boolean' },
},
@@ -38,13 +38,13 @@ const PATCH_PRODUCT_SCHEMA = {
slug: { type: 'string' },
categoryId: { type: 'string' },
priceCents: { type: 'number', minimum: 0 },
quantity: { type: 'number', minimum: 0 },
quantity: { type: 'number', minimum: 0, nullable: true },
inStock: { type: 'boolean' },
leadTimeDays: { type: 'number', minimum: 1 },
shortDescription: { type: 'string' },
description: { type: 'string' },
leadTimeDays: { type: 'number', minimum: 1, nullable: true },
shortDescription: { type: 'string', nullable: true },
description: { type: 'string', nullable: true },
materials: { anyOf: [{ type: 'array', items: { type: 'string' } }, { type: 'string' }] },
imageUrl: { type: 'string' },
imageUrl: { type: 'string', nullable: true },
imageUrls: { type: 'array', items: { type: 'string' } },
published: { type: 'boolean' },
},