-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
148 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
80 changes: 80 additions & 0 deletions
80
src/Docs/V1/Shopify/Controllers/Products/ProductsController.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
<?php | ||
namespace NexaMerchant\Shopify\Docs\V1\Shopify\Controllers\Products; | ||
|
||
class ProductsController { | ||
/** | ||
* @OA\Get( | ||
* path="/products", | ||
* operationId="getProductsList", | ||
* tags={"Shopify"}, | ||
* summary="Get list of products", | ||
* description="Returns list of products", | ||
* @OA\Response( | ||
* response=200, | ||
* description="Successful operation", | ||
* @OA\JsonContent(ref="#/components/schemas/Products") | ||
* ), | ||
* @OA\Response( | ||
* response=400, | ||
* description="Bad Request" | ||
* ) | ||
* ) | ||
*/ | ||
public function getProductsList() { | ||
} | ||
|
||
/** | ||
* @OA\Get( | ||
* path="/products/{id}", | ||
* operationId="getProductById", | ||
* tags={"Shopify"}, | ||
* summary="Get product information", | ||
* description="Returns product data", | ||
* @OA\Parameter( | ||
* name="id", | ||
* description="Product id", | ||
* required=true, | ||
* in="path", | ||
* @OA\Schema( | ||
* type="integer" | ||
* ) | ||
* ), | ||
* @OA\Response( | ||
* response=200, | ||
* description="Successful operation", | ||
* @OA\JsonContent(ref="#/components/schemas/Product") | ||
* ), | ||
* @OA\Response( | ||
* response=400, | ||
* description="Bad Request" | ||
* ) | ||
* ) | ||
*/ | ||
public function getProductById() { | ||
} | ||
|
||
/** | ||
* @OA\Post( | ||
* path="/products", | ||
* operationId="createProduct", | ||
* tags={"Shopify"}, | ||
* summary="Create new product", | ||
* description="Create new product", | ||
* @OA\RequestBody( | ||
* required=true, | ||
* @OA\JsonContent(ref="#/components/schemas/Product") | ||
* ), | ||
* @OA\Response( | ||
* response=201, | ||
* description="Successful operation", | ||
* @OA\JsonContent(ref="#/components/schemas/Product") | ||
* ), | ||
* @OA\Response( | ||
* response=400, | ||
* description="Bad Request" | ||
* ) | ||
* ) | ||
*/ | ||
public function createProduct() { | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
<?php | ||
namespace NexaMerchant\Shopify\Docs\V1\Shopify\Models\Products; | ||
|
||
/** | ||
* @OA\Schema( | ||
* title="Product", | ||
* description="Product model", | ||
* ) | ||
*/ | ||
class Product | ||
{ | ||
/** | ||
* @OA\Property( | ||
* title="ID", | ||
* description="ID", | ||
* format="int64", | ||
* example=1 | ||
* ) | ||
* | ||
* @var int | ||
*/ | ||
private $id; | ||
|
||
/** | ||
* @OA\Property( | ||
* title="Name", | ||
* description="Product name", | ||
* example="Product 1" | ||
* ) | ||
* | ||
* @var string | ||
*/ | ||
private $name; | ||
|
||
/** | ||
* @OA\Property( | ||
* title="Description", | ||
* description="Product description", | ||
* example="Product 1 description" | ||
* ) | ||
* | ||
* @var string | ||
*/ | ||
private $description; | ||
|
||
/** | ||
* @OA\Property( | ||
* title="Price", | ||
* description="Product price", | ||
* example=100.00 | ||
* ) | ||
* | ||
* @var float | ||
*/ | ||
private $price; | ||
|
||
/** | ||
* @OA\Property( | ||
* title="Image", | ||
* description="Product image", | ||
* example="product1.jpg" | ||
* ) | ||
* | ||
* @var string | ||
*/ | ||
private $image; | ||
} |