Skip to content

Commit 10bb2dd

Browse files
committed
fix(schema): priceVariants are an array in PriceListProductVariantInputSchema
1 parent fb6d0e8 commit 10bb2dd

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

components/schema/src/pim/pricelists/pricelist-input.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export type PriceListPriceVariantInput = z.infer<typeof PriceListPriceVariantInp
1515

1616
export const PriceListProductVariantInputSchema = z.object({
1717
sku: z.string().min(1),
18-
priceVariants: PriceListPriceVariantInputSchema.nullish(),
18+
priceVariants: z.array(PriceListPriceVariantInputSchema).nullish(),
1919
});
2020
export type PriceListProductVariantInput = z.infer<typeof PriceListProductVariantInputSchema>;
2121

components/schema/tests/mass-operation/valid-files/mass-ops-pricelists.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@
3333
"variants": [
3434
{
3535
"sku": "chair-001",
36-
"priceVariants": {
36+
"priceVariants": [{
3737
"identifier": "eur",
3838
"modifier": 12.25,
3939
"decimalPlaces": 2
40-
}
40+
}]
4141
}
4242
]
4343
},
@@ -67,10 +67,10 @@
6767
},
6868
{
6969
"sku": "table-002",
70-
"priceVariants": {
70+
"priceVariants": [{
7171
"identifier": "eur",
7272
"modifier": 20
73-
}
73+
}]
7474
}
7575
]
7676
},

0 commit comments

Comments
 (0)