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:
Philip Korsholm
2023-04-20 08:54:26 +02:00
committed by GitHub
parent 7d1a78a84f
commit 2be144ff05
27 changed files with 395 additions and 70 deletions

View 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

View 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.

View 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

View 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.