-
Notifications
You must be signed in to change notification settings - Fork 941
/
Copy pathProductController.php
43 lines (39 loc) · 1017 Bytes
/
ProductController.php
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
40
41
42
43
<?php
namespace OpenApi\Examples\UsingTraits;
use OpenApi\Annotations as OA;
/**
* A controller.
*/
class ProductController
{
use DeleteEntity;
/**
* @OA\Get(
* tags={"Products"},
* path="/products/{product_id}",
* @OA\Parameter(
* description="ID of product to return",
* in="path",
* name="product_id",
* required=true,
* @OA\Schema(
* type="string"
* )
* ),
* @OA\Response(
* response="default",
* description="successful operation",
* @OA\JsonContent(
* oneOf={
* @OA\Schema(ref="#/components/schemas/SimpleProduct"),
* @OA\Schema(ref="#/components/schemas/Product"),
* @OA\Schema(ref="#/components/schemas/TrickyProduct")
* }
* )
* )
* )
*/
public function getProduct($id)
{
}
}