Skip to content

Commit

Permalink
[API] Add missing inStock field to swagger
Browse files Browse the repository at this point in the history
  • Loading branch information
arti0090 committed May 20, 2021
1 parent 2bd25cd commit de3a88d
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,15 @@ public function normalize($object, $format = null, array $context = [])
'readOnly' => true,
];

$inStockSchema = [
'type' => 'boolean',
'nullable' => false,
'readOnly' => true,
];

$docs['components']['schemas']['Product.jsonld-admin.product.read']['properties']['defaultVariant'] = $defaultVariantSchema;
$docs['components']['schemas']['Product.jsonld-shop.product.read']['properties']['defaultVariant'] = $defaultVariantSchema;
$docs['components']['schemas']['Product.jsonld-shop.product.read']['properties']['inStock'] = $inStockSchema;

return $docs;
}
Expand Down

0 comments on commit de3a88d

Please sign in to comment.