feat(medusa): Add purchasable prop on variants when setting availability (#3811)
* write integration tests * update variant inventory decorator * update types * add changeset * feedback comments * add yaml schemas * different oas approach * pr feedback * update oas --------- Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>
This commit is contained in:
10
docs/api/admin/components/schemas/DecoratedProduct.yaml
Normal file
10
docs/api/admin/components/schemas/DecoratedProduct.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
title: Product with decorated variants
|
||||
type: object
|
||||
allOf:
|
||||
- $ref: ./Product.yaml
|
||||
- type: object
|
||||
properties:
|
||||
variants:
|
||||
type: array
|
||||
items:
|
||||
$ref: ./DecoratedVariant.yaml
|
||||
9
docs/api/admin/components/schemas/DecoratedVariant.yaml
Normal file
9
docs/api/admin/components/schemas/DecoratedVariant.yaml
Normal file
@@ -0,0 +1,9 @@
|
||||
title: Decorated Product Variant
|
||||
type: object
|
||||
allOf:
|
||||
- $ref: ./PricedVariant.yaml
|
||||
- type: object
|
||||
properties:
|
||||
purchasable:
|
||||
type: boolean
|
||||
description: Boolean indicating if variant is purchasable.
|
||||
10
docs/api/store/components/schemas/DecoratedProduct.yaml
Normal file
10
docs/api/store/components/schemas/DecoratedProduct.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
title: Product with decorated variants
|
||||
type: object
|
||||
allOf:
|
||||
- $ref: ./Product.yaml
|
||||
- type: object
|
||||
properties:
|
||||
variants:
|
||||
type: array
|
||||
items:
|
||||
$ref: ./DecoratedVariant.yaml
|
||||
9
docs/api/store/components/schemas/DecoratedVariant.yaml
Normal file
9
docs/api/store/components/schemas/DecoratedVariant.yaml
Normal file
@@ -0,0 +1,9 @@
|
||||
title: Decorated Product Variant
|
||||
type: object
|
||||
allOf:
|
||||
- $ref: ./PricedVariant.yaml
|
||||
- type: object
|
||||
properties:
|
||||
purchasable:
|
||||
type: boolean
|
||||
description: Boolean indicating if variant is purchasable.
|
||||
Reference in New Issue
Block a user