forked from zircote/swagger-php
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ProductController.php
43 lines (39 loc) · 910 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\UsingRefs;
use OpenApi\Annotations as OA;
/**
* @OA\PathItem(
* path="/products/{product_id}",
* @OA\Parameter(ref="#/components/parameters/product_id_in_path_required")
* )
*/
class ProductController
{
/**
* @OA\Get(
* tags={"Products"},
* path="/products/{product_id}",
* @OA\Response(
* response="default",
* ref="#/components/responses/product"
* )
* )
*/
public function getProduct($id)
{
}
/**
* @OA\Patch(
* tags={"Products"},
* path="/products/{product_id}",
* @OA\RequestBody(ref="#/components/requestBodies/product_in_body"),
* @OA\Response(
* response="default",
* ref="#/components/responses/product"
* )
* )
*/
public function updateProduct($id)
{
}
}