forked from zircote/swagger-php
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProduct.php
More file actions
39 lines (33 loc) · 754 Bytes
/
Product.php
File metadata and controls
39 lines (33 loc) · 754 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?php
namespace OpenApi\Examples\UsingRefs;
use OpenApi\Annotations as OA;
/**
* A common scenario is to let swagger-php generate a definition based on your model class.
* These definitions can then be referenced with `ref="#/components/schemas/$classname".
*/
/**
* @OA\Schema(
* description="Product model",
* type="object",
* title="Product model"
* )
*/
class Product extends Model
{
/**
* The unique identifier of a product in our catalog.
*
* @var int
*
* @OA\Property(format="int64", example=1)
*/
public $id;
/**
* @OA\Property(ref="#/components/schemas/product_status")
*/
public $status;
/**
* @OA\Property
*/
public StockLevel $stockLevel;
}